String

public extension String
  • Returns a String removing all whitespaces, not only the leading/trailing but also in the middle of the string

    Declaration

    Swift

    var removingWhitespaces: String { get }
  • Returns a String removing the leading/trailing whitespaces and new lines

    Declaration

    Swift

    var trimmingWhitespacesAndNewLines: String { get }
  • Transform String date from one format to another

    Declaration

    Swift

    func transformDateFormat(_ receivingFormat: String, new transforming: String) -> String?

    Parameters

    receivingFormat

    actual string date format

    transforming

    new date format

    Return Value

    String with the new format or nil if fail