Converting between String and Data without optionalsBasics article available: Strings
While Swift offers many APIs for converting between
String, these two let us do so without any optionals — usually resulting in simpler code:
// String -> Data let data = Data("Hello, world!".utf8) // Data -> String let string = String(decoding: data, as: UTF8.self)
The perfect calculation companion for developers. Calculate anything — from dates, to budgets and prices, to what value to use as input for an algorithm. With variables, natural language processing, inline results, and more — it’s like Swift Playgrounds, but for math calculations.