by shigemk2

当面は技術的なことしか書かない

文字列の置換

replace.scala

Because a String is immutable, you can’t perform find-and-replace operations directly on it, but you can create a new String that contains the replaced contents.

そういえばScalaは関数型言語としての顔があることを思い出しつつ、変数を直接書き換えることは出来ないんだねっていう話をしてみる。

f:id:shigemk2:20150111190513p:plain