Creates a string containing the given character.
SDK
- Xcode 6.0.1+
Framework
- Swift Standard Library
Declaration
init(_ c: Character)
Parameters
cThe character to convert to a string.
Creates a string containing the given character.
SDK
Framework
init(_ c: Character)
cThe character to convert to a string.
init()Creates an empty string.
init<S>(S)Creates a new string containing the characters in the given sequence.
init<S>(S)Creates a new instance of a collection containing the elements of a sequence.
init<S>(S)Creates a new string containing the characters in the given sequence.
init(Substring)Creates a new string from the given substring.
init(repeating: String, count: Int)Creates a new string representing the given string repeated the specified number of times.
init(repeating: Character, count: Int)Creates a string representing the given character repeated the specified number of times.