Created
June 29, 2021 01:25
-
-
Save novinfard/9c7748435cee56b08d0dc896d0547a9e to your computer and use it in GitHub Desktop.
[Update SwiftUI app to demonstrate English number converter]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var body: some View { | |
VStack(spacing: 16) { | |
Text(text) | |
HStack { | |
Spacer() | |
.frame(width: 16) | |
image | |
Spacer() | |
} | |
// a Persian number | |
Text(String("۱۲۳۱۲۳۵۶")) | |
// a Persian number converted to its English equivalent | |
Text(String("۱۲۳۱۲۳۵۶".toEnglishNumberInt ?? 0)) | |
Spacer() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment