Apple’s documentation and many articles suggest you can convert a substring (string.subsequence) to a string just by calling String(substring)
let str = "Hello world"
let hello = str.prefix(5) //create substr
//CREATE STRING FROM SUBSTRING
let hellostr = String(hello) //gives error
However I am getting the error
"No exact matches in call to initializer "
What could be causing this error?
Thanks for any suggestions.