String
public extension String
Extension for String functionality.
-
Extends the functionality of a String with the ability to replace one string with another string.
Declaration
Swift
func replace(_ string: String, with replaceString: String) -> StringParameters
stringThe String Object. The string to be replaced.
replaceStringThe String Object. Whose string will be replaced by the original string.
Return Value
The String Object that contains a string with replaced string.
-
Extends the functionality of a String with the ability to replace symbol with Zwnj symbol.
Declaration
Swift
mutating func replaceSymbolWithZwnj(symbol: String) -> StringParameters
symbolThe String Object.
Return Value
The String Object that contains a string with zwnj symbol replaced with another symbol.
-
Extends the functionality of a String with the ability to slice one string from another string.
Declaration
Swift
func slice(from: String, to: String) -> String?Parameters
fromThe String Object. The beginning of the string from which the fragment will be cut.
toThe String Object. The end of string to which the fragment will be cut.
Return Value
The String Object that contains a string between from string and to string.
String Extension Reference