strcmp, strcasecmp, strncasecmp, strncmp - compare two null-terminated strings.
#include <sys/ddi.h> int strcmp(const char *s1, const char *s2);
int strcasecmp(const char *s1, const char *s2);
int strncasecmp(const char *s1, const char *s2, size_t n);
int strncmp(const char *s1, const char *s2, size_t n);
Solaris DDI specific (Solaris DDI).
s1, s2
n
The strcmp() function returns 0 if the strings are the same, or the integer value of the expression (*s1 - *s2) for the last characters compared if they differ.
The strcasecmp() and strncasecmp() functions are case-insensitive versions of strcmp() and strncmp(), respectively, described in this section. They assume the ASCII character set and ignore differences in case when comparing lowercase and uppercase characters.
The strncmp() function returns 0 if the first n characters of s1 and s2 are the same, or (*s1 - *s2) for the last characters compared if they differ.
The strcmp() function returns 0 if the strings are the same, or (*s1 - *s2) for the last characters compared if they differ.
The strcasecmp() and strncasecmp() functions return values in the same fashion as strcmp() and strncmp(), respectively.
The strncmp() function returns 0 if the first n characters of strings are the same, or (*s1 - *s2) for the last characters compared if they differ.
These functions can be called from user, interrupt, or kernel context.
Writing Device Drivers
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |