For any given String
, for instance
val s = "abde"
how to insert a character c: Char
at position 2, after b
?
Update
Which Scala collection to consider for multiple efficient insertions and deletions at random positions ? (Assuming that a String
may be transformed into that collection.)