Drive-by: the second sentence here doesn't seem to match what the function implements. The function will only return false if *all* characters in the string are whitespace or control characters. I think that's actually the behavior you want, but the comment seems to imply that it will return false if there's a single whitespace/control character at the beginning of the value.