fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 308: Integer to string in base b
Idiom # 308: Integer to string in base b
See
programming-idioms.org
:
Code
s := n.as_string b
What are effects?
Runnable Example
ex308 is test_pairs := [(2, 2), (3, 3), (65535, 2), (11259375, 16), (8191, 8), (1057, 23), (42, 10),] for t in test_pairs do (n, b) := t s := n.as_string b.as_u32 say "$n in base $b is $s"
What are effects?
last changed: 2024-08-19
next: Idiom # 309: Clone a 2D array