I have a List of String declared like this:
var re1_emoticons=""::Nil
Which I have then filled in with emoticons (Strings). I am trying to add a \\ at the beginning of each String in re1_emoticons, modifying the original var.
First attempt:
re1_emoticons.foreach(t=>"""\\""" + t)
Second attempt:
re1_emoticons.foreach(t=>re1_emoticons.indexOf(t)="""\\"""+ t)
Third attempt:
re1_emoticons.foreach(t=>re1_emoticons.indexOf(t):="""\\"""+ t)
However still don't find the way. Is there a correct way to do this?