Wolfram: String Insert

By Xah Lee. Date: .

Insert into String, by Index

StringInsert[ str, newStr, index ]

insert at index. If negative, count from right.

StringInsert

StringInsert[ "love cat", "I ", 1 ]
(* I love cat *)
StringInsert[ str, newStr, indexList ]

insert at multiple indexes.

StringInsert[ strList, newStr, index ]

insert to multiple strings.

WolframLang String