0

Does not exist strupr() and strlwr() in the library <string.h> of c++?

24th Mar 2021, 9:43 AM
Eliezer
Eliezer - avatar
2 odpowiedzi
+ 5
That's because strupr() and strlwr() are not standard function, these functions are sometimes shipped with the implementation of the compiler on some platforms but generally it is recomemded to write your own custom functions to conver the string to upper and/or lower case (you can use toupper() and tolower() from <ctype.h> header for the same)
24th Mar 2021, 9:54 AM
Arsenic
Arsenic - avatar
+ 1
By the way, when using C header files in C++, you should include <cstring> instead of <string.h> (c prefix instead of .h suffix)
24th Mar 2021, 3:24 PM
Michal Doruch