-4

I want to convert the value of Int64 variable to String. String(x) is not working here.

Asperi
  • 228,894
  • 20
  • 464
  • 690
  • 2
    https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html – Asperi Aug 10 '22 at 12:41
  • 2
    Hi Sajib, I also think is a good idea to check out the link that Asperi provided in the comment before. But could you also please add some code that is not working. E.g. when I create a Int64 variable (var number) and I use it (String(number)) in a SwiftUI Text, in a print command or even in a new variable/constant (let intToNumber = String(number)), it works well for me. – Sebastian Fox Aug 10 '22 at 13:23
  • Does this answer your question? [Convert Int to String in Swift](https://stackoverflow.com/questions/24161336/convert-int-to-string-in-swift) – Iva Aug 11 '22 at 05:14

1 Answers1

1
let number: Int64 = 64
let string: String = "\(number)"
print(string)

output

64
Program ended with exit code: 0
Blacksmith
  • 199
  • 7