String

extension String
  • Encodes current String into Base64 encoded string

    Declaration

    Swift

    public func base64Encoded() -> String

    Return Value

    Base64 encoded string

  • Returns a Base64URL encoded string from the string.

    Declaration

    Swift

    public func base64URLEncodedString() -> String
  • Decodes current Base64 encoded string

    Declaration

    Swift

    public func base64Decoded() -> String?
  • Validates whether current String is base64 encoded or not

    Declaration

    Swift

    public func isBase64Encoded() -> Bool
  • Decodes URL string

    Declaration

    Swift

    public func decodeURL() -> Data?

    Return Value

    URL safe decoded bytes array

  • Adds base64 pad

    Declaration

    Swift

    public func base64Pad() -> String

    Return Value

    Base64 pad added string

  • Decodes base64 and converts it into bytes array

    Declaration

    Swift

    public func decodeBase64() -> Data?

    Return Value

    Base64 decoded bytes array

  • Converts String to URL safe decoded string

    Declaration

    Swift

    public func urlSafeDecoding() -> String

    Return Value

    URL safe decoded string

  • Converts String to URL safe encoded string

    Declaration

    Swift

    public func urlSafeEncoding() -> String

    Return Value

    URL safe encoded string