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

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=Reverses.

• 

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

withStringTools:

IsPalindrome

true

(1)

IsPalindromeaaa

true

(2)

IsPalindromeabc

false

(3)

IsPalindromeabcba

true

(4)

IsPalindrometenet

true

(5)

IsPalindrometenets

false

(6)

IsPalindromeROTOR

true

(7)

IsPalindromecivic

true

(8)

IsPalindromesemitimes

true

(9)

IsPalindromeaibohphobia

true

(10)

IsPalindromeailihphilia

true

(11)

IsPalindromekinnikinnik

true

(12)

IsPalindromereliefpfeiler

true

(13)

IsPalindromeattordidrotta

true

(14)

IsPalindromesaippuakauppias

true

(15)

See Also

string

StringTools

StringTools[IsPermutation]