Data
public extension Data
-
Convert self to an Int value
Declaration
Swift
var toInt: Int { get } -
Convert self to a binary integer value
Note
annotate the return value, e.g.var myInt: Int64 = myData.binInt()Declaration
Swift
func binInt<T>() -> T where T : BinaryIntegerReturn Value
a binary integer value
-
Write to a cache file
Declaration
Swift
func writeToCacheFile(name: String, ext: String) -> URL?Parameters
namefile name
extfile extension
Return Value
URL of nil
-
Initialize self from a local file
Declaration
Swift
init?(fromFileAt url: URL)Parameters
urlcache file url
-
Return string from data
Declaration
Swift
var string: String { get } -
Initialize self from string
Declaration
Swift
init?(from string: String)Parameters
stringinput string