Solaris Developer Quiz May 2, 2007
Which of the following standard C library APIs is not locale sensitive?a) strcat
b) strcasecmp
c) strxfrm
d) strcspn
The correct answer is c.
'strxfrm' performs string transformation. The transformation function is such that two transformed strings can be ordered by strcmp(3C) as appropriate to collating sequence information intheprogram's locale(category LC_COLLATE).
'strcat' appends a copy of a second string (s2) to the first string (s1).
'strcasecmp' is a case insensitive version of strcmp.
'strcspn' returns thelengthoftheinitial segment of string s1 that consists entirely of characters not from string s2.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/27174/showart_467074.html
页:
[1]