StringTools[IsMonotonic] - test whether a string is a palindrome
|
Calling Sequence
|
|
IsMonotonic( s )
|
|
Description
|
|
•
|
The IsMonotonic(s) command returns the value true if s is monotonic, and the value false otherwise. A string is monotonic if the sequence of characters it comprises is non-increasing or non-decreasing, when the characters are identified with their ASCII code points.
|
•
|
If s is the empty string, the command returns true.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
|
|
Download Help Document
Was this information helpful?