StringTools
Delete
delete a segment of a string
Calling Sequence
Parameters
Description
Examples
Delete( s, rng )
s
-
string; a Maple string
rng
range of characters to delete
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 .
All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters. Thus, there is no support for multibyte character encodings, such as unicode encodings.
with⁡StringTools:
Delete⁡abcde,2..3
ade
Delete⁡abcde,4..4
abce
Delete⁡abcde,2..−2
ae
Delete⁡abcde,2..7
a
Delete⁡,1..−1
Delete⁡,98..43
Delete⁡,5..5
See Also
string
StringTools[Insert]
Download Help Document