Very hard, you have to use compound if/then statements.

check to make sure you are not String -Out-of-Bounds when using
str.substring()