I was looking for this on internet and in every place with the functions of string.h these two are not mentioned.
Is because what? They aren't in every compiler?
これらは、Microsoft の C ライブラリの非標準関数です。_strlwr()
MS は、名前が変更された関数とを支持して、それらを非推奨にしました_strupr()
。
MS のドキュメントでは、これらは POSIX 関数であると主張されていますが、私が知る限り、そうではありませんでした。
MS 以外のツールチェーンでそれらを使用する必要がある場合は、簡単に実装できます。
char* strlwr(char* s)
{
char* tmp = s;
for (;*tmp;++tmp) {
*tmp = tolower((unsigned char) *tmp);
}
return s;
}
These functions are not C standard functions. So it is implementation-defined whether they are supported or not.
これらの関数は標準ではなく、実際には署名が壊れているか使用できません。大文字と小文字のマッピングでは長さが変わる可能性があるため、通常、文字列をその場で大文字と小文字を区別することはできません。