String
extension String
-
Create a new date using this string.
Declaration
Swift
public func date(_ pattern: DateFormatPattern) -> Date?Parameters
patternthe date pattern
Return Value
A new date if this string is well formatted, otherwise nil.
-
Remove from this string whitespaces and new lines.
Declaration
Swift
public var trimmed: String { get } -
Returns an array containing all elements splitting by the separator.
Declaration
Swift
public func split(separator: String) -> [String]Parameters
separatorthe separator key.
-
This string as integer.
Declaration
Swift
public var asInt: Int? { get } -
This string as float.
Declaration
Swift
public var asFloat: Float? { get } -
This string as double.
Declaration
Swift
public var asDouble: Double? { get }
-
Undocumented
Declaration
Swift
public var trim: String { get }
View on GitHub
Install in Dash
String Extension Reference