replace item/value in map()
This function replaces value of key a in map b with value e.
If d > 0 and a delimiter c is given, the value in position d of the itemised map value (with the delimiter c) will be replaced (see examples for better understanding).
The return value of the function is the new value of key a.
Parameters
Parameter |
Description |
a |
Key value. |
b |
Name of the map. |
c |
Delimiter. |
d |
Number of item (map value of key a is itemised by delimiter c) to be replaced. See examples. |
e |
Value to be set. |
Examples
Assume a map myMap with the values {key1=value, key2=val1;val2}.
Parameter a |
Parameter b |
Parameter c |
Parameter d |
Parameter e |
Result |
key1 |
myMap |
|
|
newvalue |
newvalue |
key2 |
myMap |
; |
2 |
newvalue |
val1;newvalue |
key2 |
myMap |
|
|
newvalue |
newvalue |
key |
myMap |
|
|
newvalue |
newvalue |
key1 |
myOtherMap |
| |
3 |
newvalue |
||newvalue |