StringTools[Delete] - delete a segment of a string
|
Calling Sequence
|
|
Delete( s, rng )
|
|
Parameters
|
|
s
|
-
|
string; a Maple string
|
rng
|
-
|
range of characters to delete
|
|
|
|
|
Description
|
|
•
|
The Delete(s,rng) command removes a segment of a string s, specified by the second argument rng.
|
•
|
The range argument rng must specify a valid range of characters in the string s, unless the string s is empty. If s is the empty string, then the empty string is returned in all cases, no matter how the range is specified.
|
•
|
When the endpoints of rng are equal, a single character of the non-empty string s is removed.
|
•
|
Note that Delete( s, 1 .. length( s ) ) (or, equivalently, Delete( s, 1 .. -1 )) returns the empty string .
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
|
|
Download Help Document
Was this information helpful?