Comment detail

文字列の反転 (Nested Flatten)
1
2
3
4
5
6
7
8
9
def reverseString( text ){
    def list = []
    ((text.size()-1)..0).each{
        list << text[it]
    }
    list.join("")
}
    
println reverseString("こんにちわ")

Index

Feed

Other

Link

Pathtraq

loading...