In my program, I read a postscript file. Normal postscript files should only be composed of ascii characters, but one never knows what users give us. Therefore I'd like to make sure that the string the program read is only made up of ascii characters. This simplifies the code thereafter, because I then can assume, that codeunit==codepoint. Is there a simple way to do so?

Here a sketch of my function:

void foo(string postscript)
{
   // throw Exception, if postscript is not all ascii
   // other stuff, assuming codeunit=codepoint
}

Reply via email to