Scala小题目:001
练手题 题目def strtr(src:String, from:String, to:String):String from 和 to是等长的字符串, 要求将src中值为from(i)的字符转换成to(i)例如: strtr(“abcdaf”, “ac”, “AC”) == “AbCdAf” 先来个Java风格版的代码:def java1(src: String, from: String,
练手题 题目def strtr(src:String, from:String, to:String):String from 和 to是等长的字符串, 要求将src中值为from(i)的字符转换成to(i)例如: strtr(“abcdaf”, “ac”, “AC”) == “AbCdAf” 先来个Java风格版的代码:def java1(src: String, from: String,