3 ms·
Color me surprised, since locale stuff usually makes all these functions really slow…
by saagarjha 6y ago
Color me surprised, since locale stuff usually makes all these functions really slow…
- JdeBP 6y agoSpeaking as someone who wrote a Standard C library like this many years ago, I can confirm. All of the work is done inside setlocale(), switching (or constructing) tables. The character type functions devolve to a single table lookup. For those interested: The technique is used in P. J. Plauger's 1992 The Standard C Library and has been around a long time.