DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

nl_strcmp(S)


nl_strcmp, nl_strncmp -- compare native language strings

Syntax

cc -a ods30 . . . -lc

int *nl_strcmp (s1, s2)
char *s1, *s2;

int *nl_strncmp (s1, s2, n) char *s1, *s2; int n;

Description

nl_strcmp- compare native language strings

nl_strncmp- compare native n language strings

The routines nl_strcmp and nl_strncmp are provided as an alternative interface to the strcoll(S) routine, for programs written to the X/OPEN Portability Guide, Issue 2, standard. However, these routines have been withdrawn from XPG3. They provide the same functions as the string(S) routines strcmp and strncmp, except that the language dependent collating information defined for the current LC_COLLATE locale is used to rank the strings, instead of the binary values of the machine character set.

In this way, the strings are compared according to the dictionary order of data, taking into account case and accent priority, 1-to-1, 1-to-2, 2-to-1 and don't care character mappings.

See also

coltbl(M), nl_init(S), strcoll(S), string(S)

Standards conformance

nl_strcmp and nl_strncmp are obsolete and may not be supported on future releases. Use strcmp(S) and strncmp(S) instead.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003