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