|
replace
|
The replace function replaces a specified number of characters in a
Text or String with another Text or String. The replace function is
non-destructive
When to use The replace function replaces only the substring at the specified index.
The replace function is similar to the substitute function, except
that substitute can replace any or all of the occurrences of the specified
substring whereas replace only replaces one at a specified position in the
String.
(replace old-text start length new-text) The result string after the replace has been done
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types old-text A String object or Text that contains the text to be replaced. String or Text start A positive integer indicating the position of the first character in old-text to be replaced.
Set start to 0 for the first character, 1 for the second and so on Integer length A positive integer representing the number of characters, after the starting
position, to be replaced. Integer new-text The Text or String to be inserted in old-text at start, replacing the
specified characters. new-text does not have to be the same length as length String or Text
Returns:
Examples
Argument Types
String
Text
Integer
How do I contact the AIS team?