String

public extension String
extension String: URLConvertible
  • Declaration

    Swift

    var isNotEmpty: Bool { get }
  • Declaration

    Swift

    func localized(_ lang: String? = "en", defaultString: String = "") -> String
  • Declaration

    Swift

    func localized(_ defaultString: String) -> String
  • Declaration

    Swift

    func getCountryCode() -> String?
  • Declaration

    Swift

    subscript(offset: Int) -> Character { get }
  • Declaration

    Swift

    var timeZoneFullName: String? { get }
  • Returns a URL if self represents a valid URL string that conforms to RFC 2396 or throws an AFError.

    Throws

    An AFError.invalidURL if self is not a valid URL string.

    Declaration

    Swift

    public func asURL() throws -> URL

    Return Value

    A URL or throws an AFError.

  • Convert html text to a colorful attributed string

    Declaration

    Swift

    var html2Attributed: NSAttributedString? { get }
  • Declaration

    Swift

    var html2PlainText: String { get }
  • Declaration

    Swift

    public func localizedMain(_ lang: String? = "en", defaultString: String = "") -> String
  • Declaration

    Swift

    public func localizedMain(_ defaultString: String) -> String