|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
StringInsert
StringInsert["string", "snew", n]
yields a string with
inserted starting at position
in
.
StringInsert["string", "snew", -n]
inserts at position
from the end of
.
StringInsert["string", "snew", {n1, n2, ...}]
inserts a copy of
at each of the positions
.
StringInsert[{s1, s2, ...}, "snew", n]
gives the list of results for each of the
.
DetailsDetails
- StringInsert["string", "snew", n] makes the first character of snew the

character in the new string. - StringInsert["string", "snew", -n] makes the last character of snew the

character from the end of the new string. - In StringInsert["string", "snew", {n1, n2, ...}] the
are taken to refer to positions in
before any insertion is done. »
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
Insert "XYZ" after character position 4:
| In[1]:= |
| Out[1]= |
New in 2 | Last modified in 5.1
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
