Javadoc improvements.
Fix stripping trailing tokens from a string that only consists of the token to strip.