Creates a new string from the given substring.
SDK
- Xcode 10.2+
Framework
- Swift Standard Library
Declaration
init(_ substring: Substring)
Parameters
substringA substring to convert to a standalone
Stringinstance.
Discussion
Complexity: O(n), where n is the length of substring.