Quote:
Of course, it's not hard to replace isdigit with "isisbn", and produce a function chat checks for "isdigit", and if it isn't, checks for 'X'. Just make sure you make it uppercase first (or allow lowercase, but if you are going to "massage" the string in the first place, you may just as well convert it too).
Of course, you'd be best off calling such a function is_isbn(), since identifiers beginning with "is" followed by a lowercase letter are reserved because of ctype.h/cctype (in C at least, and I don't see why C++ would be any different).