X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fstring.h;h=9e9df4faa1ee054cbfd3aa746aeaeba8e859564e;hb=1b2faf7409371da71c440704e3a75c34f7a9d750;hp=2583a3574434ec7222c7caf0fc970f8bd7e1b04a;hpb=9f4d2aa894b1ccb7c82e1bd277f51ab1bce9f288;p=libucw.git diff --git a/ucw/string.h b/ucw/string.h index 2583a357..9e9df4fa 100644 --- a/ucw/string.h +++ b/ucw/string.h @@ -2,7 +2,7 @@ * UCW Library -- String Routines * * (c) 2006 Pavel Charvat - * (c) 2007--2011 Martin Mares + * (c) 2007--2012 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -92,8 +92,8 @@ const char *hex_to_mem(byte *dest, const char *src, uns max_bytes, uns flags); /* str-fix.c */ -int str_has_prefix(char *str, char *prefix); /** Tests if @str starts with @prefix. **/ -int str_has_suffix(char *str, char *suffix); /** Tests if @str ends with @suffix. **/ +int str_has_prefix(const char *str, const char *prefix); /** Tests if @str starts with @prefix. **/ +int str_has_suffix(const char *str, const char *suffix); /** Tests if @str ends with @suffix. **/ /** * Let @str and @prefix be hierarchical names with components separated by @@ -110,7 +110,7 @@ int str_has_suffix(char *str, char *suffix); /** Tests if @str ends with @suffi * - "/" is a prefix, * - "" is a prefix. **/ -int str_hier_prefix(char *str, char *prefix, uns sep); -int str_hier_suffix(char *str, char *suffix, uns sep); /** Like @str_hier_prefix(), but for suffixes. **/ +int str_hier_prefix(const char *str, const char *prefix, uns sep); +int str_hier_suffix(const char *str, const char *suffix, uns sep); /** Like @str_hier_prefix(), but for suffixes. **/ #endif