Contents | Index | < Browse | Browse >
INSERT(<new string>, <old string>,<startpos>, [<length>],[<padchar>])
returns a string
<new string> is inserted into <old string> beginning at <startpos>, the
character-count position. <new string> will be padded with <padchar> or
truncated to <length> characters.
If <startpos> is greater than the length of <old string> then <padchar>
will be added to the end of <old string> before the new string is added.
If <startpos> is 0, then <new string> will be padded to <length> and then
added to the start of <old string>
The default length is the length of <new string>. The default pad
character is a blank.
Example:
say insert('always behaved like','I have a pig.',7,20)
>>> I have always behaved like a pig.
Also see
Next: LEFT() | Prev: DELSTR() | Contents: String functions