Looking for something to do the following:
Given input: "s"
Expected output: "t"
scala> def f(s: String) = (s.head + 1).toChar.toString
f: (s: String)java.lang.String
scala> f("s")
res10: java.lang.String = t
def nextLetter(x:String) = (x(0) + 1).toChar.toString
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With