Question : swift ui int to binary
Answered by : fancy-flatworm-7imy9ovj7bjb
let num = 22
let str = String(num, radix: 2)
print(str) // prints "10110"
Source : https://stackoverflow.com/questions/26181221/how-to-convert-a-decimal-number-to-binary-in-swift | Last Update : Wed, 15 Jun 22