Site Tools


insert

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

insert [2007/03/02 02:32] (current)
Line 1: Line 1:
 +# $EPIC: insert.txt,​v 1.3 2007/03/02 02:32:04 jnelson Exp $
 +======Synopsis:​======
 +$__insert__(<​num>​ <​word>​ <​text>​)
 +
 +======Technical:​======
 +   * The <​word>​ argument is a [[what is a word|dword]] which is different from most function arguments.
 +   * If the <num> integer argument is omitted the empty string is returned.
 +   * If the <​word>​ argument is omitted the empty string is returned.
 +   * The return value of this function is <​text>​ with the <​word>​ argument inserted after the <​num>​th character.
 +
 +======Practical:​======
 +This function can be used to insert text into the middle of a string
 +at a known location. ​ You probably found the location by using $index()
 +or $rindex().
 +
 +======Returns:​======
 +input <​text>​ with <​word>​ inserted after the <​num>​th character
 +
 +======Examples:​======
 +<​file>​
 +$insert(3 baz foobarbooya) ​ returns "​foobazbarbooya"​
 +</​file>​
  
insert.txt ยท Last modified: 2007/03/02 02:32 (external edit)