tail head cat sleep
QR code linking to this page

manページ  — STRXFRM

名称

strxfrm – 文字列をロケールにしたがって変換する

内容

ライブラリ

Standard C Library (libc, -lc)

書式

#include <string.h>

strxfrm(char *dst, const char *src, size_t n);

解説

strxfrm() 関数は、 src により示されたヌル文字で終了する文字列を、 現在のロケール照合 (locale collation) がある場合には、 それに従って変換し、 変換した文字列を dst にコピーします。 n を越えない文字数が dst にヌル文字を付加してコピーされます。 もし n に 0 がセットされた場合 (この場合変換に必要となる実サイズを決定するのを助けます)、 dst には NULL ポインタにする事が許されます。

strxfrm() の後で strcmp() を使って 2 つの文字列を比較することは、 元の 2 つの文字列を strcoll() を使って比較することと同じになります。

戻り値

完全に成功した場合、 strxfrm() は終端のヌル文字を含まない変換された文字列の長さを返します。 もしこの値が n と同じかそれより大きい場合、 dst の内容は不定です。

関連項目

setlocale(3), strcmp(3), strcoll(3)

規格

strxfrm() 関数は、 ISO/IEC 9899:1990 ("ISO C90") に適合しています。

STRXFRM (3) June 4, 1993

tail head cat sleep
QR code linking to this page


このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.

Computer science would have progressed much further and faster if all of the time and effort that has been spent maintaining and nurturing Unix had been spent on a sounder operating system.
— The Unix Haters' handbook