Swift Int To Octal

[Solved] Swift Int To Octal | Swift - Code Explorer | yomemimo.com
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

Answers related to swift int to octal

Code Explorer Popular Question For Swift