Question : swift int to octal
Answered by : fancy-flatworm-7imy9ovj7bjb
let octalInt = 0o1234 // 668
let octalString = "1234" // "1234"
let decimalIntFromOctalString = Int(octalString, radix: 0o10) // 668
let octalStringFromInt = String(octalInt, radix: 0o10) // "1234"
Source : https://stackoverflow.com/a/45246628 | Last Update : Fri, 17 Jun 22