|
| 1 | +☕ 🔥 |
| 2 | + |
| 3 | +Return true if the given string is a palindrome. Otherwise, return false. |
| 4 | + |
| 5 | +A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing. |
| 6 | + |
| 7 | +Note: You'll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything into the same case (lower or upper case) in order to check for palindromes. |
| 8 | + |
| 9 | +We'll pass strings with varying formats, such as racecar, RaceCar, and race CAR among others. |
| 10 | + |
| 11 | +We'll also pass strings with special symbols, such as 2A3*3a2, 2A3 3a2, and 2_A3*3#A |
| 12 | + |
| 13 | +<h1>Tests :</h1> |
| 14 | + |
| 15 | +palindrome("eye") should return a boolean. |
| 16 | + |
| 17 | +palindrome("eye") should return true. |
| 18 | + |
| 19 | +palindrome("_eye") should return true. |
| 20 | + |
| 21 | +palindrome("race car") should return true. |
| 22 | + |
| 23 | +palindrome("not a palindrome") should return false. |
| 24 | + |
| 25 | +palindrome("A man, a plan, a canal. Panama") should return true. |
| 26 | + |
| 27 | +palindrome("never odd or even") should return true. |
| 28 | + |
| 29 | +palindrome("nope") should return false. |
| 30 | + |
| 31 | +palindrome("almostomla") should return false. |
| 32 | + |
| 33 | +palindrome("My age is 0, 0 si ega ym.") should return true. |
| 34 | + |
| 35 | +palindrome("1 eye for of 1 eye.") should return false. |
| 36 | + |
| 37 | +palindrome("0_0 (: /-\ :) 0-0") should return true. |
| 38 | + |
| 39 | +palindrome("five|\_/|four") should return false. |
0 commit comments