Idiomatically determine all the lowercase and uppercase letters: Difference between revisions

Jakt
(Added a precision regarding the possibility to use of Unicode letters and digits in identifiers.)
(Jakt)
Line 793:
<syntaxhighlight lang="j"> (#~ tolower ~: toupper) u: i.65536
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</syntaxhighlight>
 
=={{header|Jakt}}==
<syntaxhighlight lang="jakt">
fn main() {
mut lower = StringBuilder::create()
// Iteration as code points (u32)
for code_point in 'a'..('z' + 1) {
lower.append(code_point)
}
println("{}", lower.to_string())
 
mut upper = StringBuilder::create()
// Iteration as ASCII bytes (u8), same result
for b in b'A'..(b'Z' + 1) {
upper.append(b)
}
println("{}", upper.to_string())
}
</syntaxhighlight>
 
=={{header|Java}}==
89

edits