IsPalindrome - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


StringTools

  

IsPalindrome

  

test whether a string is a palindrome

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

IsPalindrome( s )

Parameters

s

-

string

Description

• 

The IsPalindrome(s) command returns the value true if s is a palindrome, and the value false otherwise. A palindrome is a string s that is equal to its reverse: s=Reverse⁡s.

• 

If s is the empty string, the command returns true.

• 

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.

Examples

> 

with⁡StringTools:

> 

IsPalindrome⁡

true

(1)
> 

IsPalindrome⁡aaa

true

(2)
> 

IsPalindrome⁡abc

false

(3)
> 

IsPalindrome⁡abcba

true

(4)
> 

IsPalindrome⁡tenet

true

(5)
> 

IsPalindrome⁡tenets

false

(6)
> 

IsPalindrome⁡ROTOR

true

(7)
> 

IsPalindrome⁡civic

true

(8)
> 

IsPalindrome⁡semitimes

true

(9)
> 

IsPalindrome⁡aibohphobia

true

(10)
> 

IsPalindrome⁡ailihphilia

true

(11)
> 

IsPalindrome⁡kinnikinnik

true

(12)
> 

IsPalindrome⁡reliefpfeiler

true

(13)
> 

IsPalindrome⁡attordidrotta

true

(14)
> 

IsPalindrome⁡saippuakauppias

true

(15)

See Also

string

StringTools

StringTools[IsPermutation]