test whether a string is a palindrome - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Combinatorics on Words : StringTools/IsPalindrome

StringTools[IsPalindrome] - test whether a string is a palindrome

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.

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)

IsPalindromekinnikinnik

true

(10)

IsPalindromereliefpfeiler

true

(11)

IsPalindromeattordidrotta

true

(12)

IsPalindromesaippuakauppias

true

(13)

See Also

string, StringTools, StringTools[IsPermutation]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam