fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 286: Iterate over characters of a string
Idiom # 286: Iterate over characters of a string
See
programming-idioms.org
:
Code
_ := for c in s.as_codepoints i := 0, i + 1 do say "Char $i is $c"
What are effects?
Runnable Example
ex286 is s := "Hello 🌏!" for c in s.as_codepoints i := 0, i + 1 do say "Char $i is $c"
What are effects?
last changed: 2024-07-01
next: Idiom # 287: Number of bytes of a string