String

extension String
  • Create a new date using this string.

    Declaration

    Swift

    public func date(_ pattern: DateFormatPattern) -> Date?

    Parameters

    pattern

    the 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

    separator

    the 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 }

Renamed

  • Undocumented

    Declaration

    Swift

    public var trim: String { get }