This content has been marked as final. Show 3 replies
So what is your question?
What specific part of that are you having trouble with?
I suppose you can try finding some way to examine each character one at a time.
A quick glance seems to indicate the string can't contain any spaces except at the end. So if it has a space anywhere else, mark it as invalid. One way to do this would be a regular expression that looks for a "space followed by a character."