From the looks of it you were very close.

There are multiple ways you could go at this:


Your way, test the individual chars of the string literal for certain situations

or