Function String Words Class

IsPalindrome

Return True if the alphanumeric characters in the string are a palindrome. A palindrome is a phrase whose alphanumeric characters are the same when they are reversed.

Signature (Visual Basic / VBA)

Public Function IsPalindrome( _
    ByVal vValue As Variant _
    ) As Variant

Code Example

    IsPalindrome("This is a test.") = False
    IsPalindrome("A man, a plan, a canal, Panama.") = True
    IsPalindrome(Panama) = True

Parameters

Parameter Description
vValue The string containing the phrase which is to be checked to see if it is a palindrome. Function returns Null if vValue is Null or cannot be fixed up to a String.

Notes & Version History

Note Function uses the built-in character classification routines to determine which characters are alphanumeric.
Note Function returns False if there are no alphanumeric characters in the string vValue since an empty string is not considered a palindrome.