String

extension String

Extension that adds a few methods that are useful for the DiskCache.

  • Returns the escaped version of a filename.

    Declaration

    Swift

    func escapedFilename() -> String
  • Returns the md5 digest of this string.

    Declaration

    Swift

    func toMD5() -> String
  • Returns the path for the filename whose name is hold in this string.

    This method is used to get the md5 file name from a string that is key filename.

    Declaration

    Swift

    func MD5Filename() -> String