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
Code input
_ := for c in s.as_codepoints i := 0, i + 1 do say "Char $i is $c"
What are effects?
Runnable Example
Code input
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: 2025-05-13
next: Idiom # 287: Number of bytes of a string