MapSubstring - script function
This script function is used to map parts of any expression to a previously loaded mapping table. The mapping is case sensitive and non-iterative and substrings are mapped from left to right.
Syntax:
MapSubstring('mapname', expr)
This function can be used for mapping parts of any expression on a previously loaded mapping table. The mapping is case sensitive and non-recursive. The substrings are mapped from the left to the right.
Arguments:
Argument | Description |
---|---|
mapname | The name of a mapping table previously read by a mapping load or a mapping select statement. The name must be enclosed by single straight quotation marks. Expr is the expression whose result should be mapped by substrings. |
Example:
// Assume the following mapping table:
map1:
mapping LOAD * inline [
x, y
1, <one>
aa, XYZ
x, b ] ;
MapSubstring ('map1', 'A123') returns 'A<one>23'
MapSubstring ('map1', 'baaar') returns 'bXYZar'
MapSubstring ('map1', 'xaa1') returns 'bXYZ<one>'
Learn more
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!