Comment detail

文字列の反転 (Nested Flatten)

scalaではStringがRichStringに暗黙に変換されるので、reverseが使えます。

1
def reverse_string(s:String) = s.reverse.mkString("")

Index

Feed

Other

Link

Pathtraq

loading...