...
Scroll tablelayout | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Returns the sub-string from a string.
Scroll pagebreak |
---|
Examples
...
language | text |
---|
// Demonstrate usage of strMid
...
string $str = "This is some text";
...
string $subStr;
...
// Get 5 characters starting at index 3
...
$subStr = `strMid $str 3 5`;
...
print $subStr;
...
// Should be "s is "
...
// Get rest of string from index 8
...
$subStr = `strMid $str 8 -1`;
...
print $subStr;
...
// Should be "some text"
Additional information
Related commands
...