su  1.12.11
sofia-sip/su_string.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of the Sofia-SIP package
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00025 #ifndef SOFIA_SIP_SU_STRING_H
00026 
00027 #define SOFIA_SIP_SU_STRING_H
00028 
00047 #ifndef SU_CONFIG_H
00048 #include <sofia-sip/su_config.h>
00049 #endif
00050 
00051 #include <string.h>
00052 
00053 SOFIA_BEGIN_DECLS
00054 
00055 su_inline int su_strcmp(char const *a, char const *b)
00056 {
00057   return strcmp(a ? a : "", b ? b : "");
00058 }
00059 
00060 su_inline int su_strncmp(char const *a, char const *b, size_t n)
00061 {
00062   return strncmp(a ? a : "", b ? b : "", n);
00063 }
00064 
00065 SOFIAPUBFUN char *su_strcasestr(const char *haystack, const char *needle);
00066 
00067 SOFIAPUBFUN int su_strcasecmp(char const *s1, char const *s2);
00068 SOFIAPUBFUN int su_strncasecmp(char const *s1, char const *s2, size_t n);
00069 
00070 SOFIAPUBFUN int su_strmatch(char const *str, char const *with);
00071 SOFIAPUBFUN int su_strnmatch(char const *str, char const *with, size_t n);
00072 
00073 SOFIAPUBFUN int su_casematch(char const *s1, char const *with);
00074 SOFIAPUBFUN int su_casenmatch(char const *s1, char const *with, size_t n);
00075 
00076 SOFIAPUBFUN size_t su_strnspn(char const *s, size_t size, char const *term);
00077 SOFIAPUBFUN size_t su_strncspn(char const *s, size_t ssize, char const *reject);
00078 
00079 SOFIAPUBFUN size_t su_memspn(const void *mem, size_t memlen,
00080                              const void *accept, size_t acceptlen);
00081 SOFIAPUBFUN size_t su_memcspn(const void *mem, size_t memlen,
00082                               const void *reject, size_t rejectlen);
00083 
00084 SOFIA_END_DECLS
00085 
00086 #endif /* !SOFIA_SIP_SU_STRING_H */
 All Data Structures Files Functions Variables Typedefs Enumerator Defines

Sofia-SIP 1.12.11 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.