can you please help me with this issue the String class does not have insert method it has only replace 🙁 .
what I need is:
– if I have string “I stackoverflow”
– I need to insert “love ” at index 2 to have “I love stackoverflow”
so what I need is insertAt(index, String)
thanks
You can build one of your own. Split the string and concatenate all characters before the
indexposition with the characters of the string you want to insert and with the characters after theindex.eg: