Mathematica 9 is now available

StringInsert

Usage

StringInsert["string", "snew", n] yields a string with "snew" inserted starting at position n in "string".
StringInsert["string", "snew", -n] inserts at position n from the end of "string".
StringInsert["string", "snew", { ,  , ... }] inserts a copy of "snew" at each of the positions  .
StringInsert[{ ,  , ... }, "snew", n] gives the list of results for each of the  .


Notes

• Example: StringInsert["abcdefg", "XYZ", 2]LongRightArrow .
StringInsert["string", "snew", n] makes the first character of snew the n character in the new string.
StringInsert["string", "snew", -n] makes the last character of snew the n character from the end of the new string.
• In StringInsert["string", "snew", { ,  , ... }] the  are taken to refer to positions in "string" before any insertion is done.
• See Section 2.8.2.
• New in Version 2; modified in 5.1.


Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.