textConvert
    Preparing search index...

    Function isPalindrome

    • Checks whether text reads the same forwards and backwards, ignoring case, spaces, and punctuation.

      Composes clear (lowercases, strips punctuation) and reverse internally; reversal is grapheme-cluster aware, so emoji and combining-mark sequences are handled correctly.

      Parameters

      • text: string

        Text to check.

      Returns boolean

      true if text is a palindrome under those rules, false otherwise.

      isPalindrome('A man a plan a canal Panama'); // true
      isPalindrome('racecar'); // true
      isPalindrome('hello world'); // false