Created
October 10, 2011 21:23
-
-
Save rrgroovy/1276589 to your computer and use it in GitHub Desktop.
文字列を一文字ずつ処理する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'abcdef'.each { | |
println it | |
} | |
for (s in '123456') { | |
println s | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a | |
b | |
c | |
d | |
e | |
f | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's output.
a
b
c
d
e
f
1
2
3
4
5
6