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は関数型言語としての顔があることを思い出しつつ、変数を直接書き換えることは出来ないんだねっていう話をしてみる。
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は関数型言語としての顔があることを思い出しつつ、変数を直接書き換えることは出来ないんだねっていう話をしてみる。