Tweakr
    Preparing search index...

    Function isPalindrome

    • Checks whether a given string is a palindrome.

      Non-alphanumeric characters are ignored, and the check is case-insensitive.

      Parameters

      • str: string

        The string to check.

      Returns boolean

      true if the string is a palindrome, false otherwise.

      1.1.0

      isPalindrome("racecar"); // true
      isPalindrome("A man, a plan, a canal: Panama"); // true
      isPalindrome("hello"); // false