Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thanks. Didn't consider that applied to the string after processing.
From the description:
The empty string "" can be read forward or backward the same, it's a palindrome in our case.
I'm a little confused by the Kata Description statement, "You can see that they are case insensitive and disregards non alphanumeric characters." That implies to me that for this exercise, special characters are not to be considered when evaluating the string.
One of the tests reported that "##" should return true. While I agree ## is a valid palidrome, if special characters are ignored the string is empty and is not a palidrome.
Thank you! I didn't know that.
Yes! That's a great idea, thank you @matthewglover
Ah ok - I'm more of a frontend web person so my Ruby is a bit unpolished. But I think what you're looking for is the splat operator, which gathers all args into an array (like the spread operator in JavaScript). Haven't actually tried my own kata in Ruby so not sure I'm qualified to help, but hope that's of some use!
Thanks @matt c and @matthewglover I appreciate your hint.
I should have specified that I'm trying to train in Ruby. Isn't everyone using Ruby? :)
And just an fyi, I'm a her, not a him.
Sorry @veronicacannon - didn't realise that flagging it stopped people seeing my comments (thought it just flagged it up as potentially spoiler so gave you the option). Have unflagged it now.
he cant read it because it's marked as a spoiler so this isnt much help to him
This comment is hidden because it contains spoiler information about the solution
Ack! Thank you taw. I should have caught that.
The question in the kata is "is it all whitespace"? The first example has some letters in it as well.
Working on this in Ruby and wonder why newline is not considered whitespace but tab is?
(not a spoiler, these tests are from the example text cases)
Test.assert_equals "w\n".whitespace?, false
Test.assert_equals "\t".whitespace?, true