(dorun (map-indexed (fn [i c] (println "Char" i "is" c)) s))
s.split('').asMap().forEach((i, c) => print('Char $i is $c'));
integer, parameter :: ucs4 = selected_char_kind ('ISO_10646')
character(kind=ucs4, len=30) :: s
open (output_unit, encoding='UTF-8')
do i=1,len(s)
print *,"Char ", i, " is ", s(i:i)
end do
i := 0
for _, c := range s {
fmt.Printf("Char %d is %c\n", i, c)
i++
}
forM_ (zip [0 ..] s) (\(i, c) -> putStrLn $ "Char " ++ show i ++ " is " ++ [c])
for (const [i, c] of [...s].entries()) {
console.log(`Char ${i} is ${c}`);
}
AtomicInteger i = new AtomicInteger(0);
s.chars().forEach(v -> {
char c = (char)v;
System.out.println("Char " + i.getAndIncrement() + " is " + c);
});
record E(int c) {
static int z;
E { out.printf("Char %s is %c%n", z++, c); }
}
s.chars().forEach(E::new);
range(0, s.length())
.forEach(i -> {
out.printf("Char %s is %s%n", i, s.charAt(i));
});
for(int i=0; i<s.length(); i++) {
char c = s.charAt(i);
System.out.println("Char " + i + " is " + c);
}
s.forEachIndexed { i, c ->
println("Char $i is $c")
}
for i := 1 to utf8length(s) do
writeln(format('Char %d is %s',[i, utf8copy(s,i,1)]));
binmode STDOUT, ":utf8";
while ($s =~ /(\X)/g) {
say 'Char ' . pos($s) . ' is ' . $1;
}
for i, c in enumerate(s):
print(f'Char {i} is {c}')
f = lambda i, c: f'Char {i} is {c}'
for e in enumerate(s): print(f(*e))
s.each_char.with_index{|c, i| puts "Char #{i} is #{c}" }
for (i, c) in s.chars().enumerate() {
println!("Char {} is {}", i, c);
}