When I remove "|| szArg[0] == '' || szArg[0] == ''" it compile (or put something in the single quotes).
It seems that the remove_quotes() function needs to have a beginning AND and ending quote. So, the fact that you are only getting 3 characters means that you only have one quote. You can either make the string bigger to hole the whole message and remove the quotes or you can check to see if the second character it the slash character.