To extract |
USE |
The length of a string |
$StrLen("string")$ |
The position of a specified string or substring (case-sensitive) |
$StrPos(where-to-search, what-to-search-for, idx)$ |
The position of a specified string or substring (not case-sensitive) |
$StrPosNoCase(where-to-search, what-to-search-for, idx)$ |
A substring |
$SubStrIdx(where-to-search, start-pos[, end-pos])$ |
A specified number of characters |
$SubStrLen((where-to-search, start-pos[, length])$ |
To print |
Use |
Example |
Notes |
The number of string characters in a string, spaces included |
$StrLen(#OneUp1.Material.Name), n0$ |
15 |
|
The position of the first dash |
$StrPos(#OneUp1.Material.Name, "–", 0), n0$ |
1 |
|
The position of the second dash |
$StrPos(#OneUp1.Material.Name, "–", 1), n0$ |
9 |
|
The position of the third dash |
$StrPos(#OneUp1.Material.Name, "–", 2), n0$ |
12 |
|
The position of the fourth dash |
$StrPos(#OneUp1.Material.Name, "–", 3), n0$ |
–1 |
There is no fourth dash in the string. |
The position of the first dash from right to left |
$StrPos(#OneUp1.Material.Name, "–", –1), n0$ |
12 |
|
The position of the substring "EB" |
$StrPos(#OneUp1.Material.Name, "EB"), n0$ |
7 |
|
The position of the substring "eb" |
$StrPos(#OneUp1.Material.Name, "eb"), n0$ |
-1 |
Because case-sensitivity is respected, "eb"
has not been found. |
The position of the substring "EB" |
$StrPosNoCase(#OneUp1.Material.Name, "EB"), n0$ |
7 |
The position of "EB". No case-sensitivity. |
The position of the substring "eb" |
$StrPosNoCase(#OneUp1.Material.Name, "eb"), n0$ |
7 |
The position of "EB". No case-sensitivity. |
The substring between two specified character positions, start position included, end position excluded |
$SubStrIdx(#OneUp1.Material.Name, strpos(#OneUp1.Material.Name,
"–", 0)+1, strpos(#OneUp1.Material.Name, "–",
1))$ |
12xy EB |
The substring between the first and second specified dashes |
Four characters from a specified position |
$SubStrLen(#OneUp1.Material.Name, strpos(#OneUp1.Material.Name,
"–", 0)+1, 4)$ |
12xy |
The four symbols after the specified dash |