StringTools[LowerCase] - change each alphabetic character in a string to lowercase
StringTools[UpperCase] - change each alphabetic character in a string to uppercase
StringTools[OtherCase] - change each alphabetic character in a string to the alternate case
|
Calling Sequence
|
|
LowerCase( s, rng )
UpperCase( s, rng )
OtherCase( s, rng )
|
|
Parameters
|
|
s
|
-
|
Maple string
|
rng
|
-
|
(optional) integer range
|
|
|
|
|
Description
|
|
•
|
The LowerCase(s) calling sequence changes each alphabetic character in the string s to lowercase and returns the result in a new string. The string s remains unchanged.
|
•
|
The UpperCase(s) calling sequence changes each alphabetic character in the string s to uppercase and returns the result in a new string. The string s remains unchanged.
|
•
|
The OtherCase(s) calling sequence changes each alphabetic character in the string s to the opposite case and returns the result in a new string. The string s remains unchanged.
|
•
|
These commands all accept an optional, second argument rng, a range that specifies a substring of the input s to be affected by the operation. Only characters within the given range are changed.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|
| (13) |
>
|
|
| (14) |
>
|
|
| (15) |
Note that LowerCase and UpperCase are not mutual inverses.
>
|
|
| (16) |
>
|
|
| (17) |
However, LowerCase(UpperCase(Lowercase(s))) = LowerCase(s) for every s.
>
|
|
| (18) |
The OtherCase command is an involution.
>
|
|
| (19) |
|
|
Download Help Document
Was this information helpful?