Quantcast
Viewing all articles
Browse latest Browse all 42

Comment by Lundin on Determining if a C-style string is alphabetic

@RolandIllig I'm of the opinion that input sanitation should be done at the point where the input might go corrupt and not in some completely unrelated library. Such as ensuring that no string contains negative values. But yeah you can cast the input to ctype.h functions to unsigned char... I'm not sure why, because if UB is invoked at that point, it means that all input data of the program is corrupt, which is the real problem.

Viewing all articles
Browse latest Browse all 42

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>