2 * UCW Library -- String Routines
4 * (c) 2006 Pavel Charvat <pchar@ucw.cz>
5 * (c) 2007--2012 Martin Mares <mj@ucw.cz>
7 * This software may be freely distributed and used according to the terms
8 * of the GNU Lesser General Public License.
14 #include <ucw/string.h>
18 strnlen(const char *str, uns n)
20 const char *end = str + n;
22 for (c = str; *c && c < end; c++);
28 str_format_flags(char *dest, const char *fmt, uns flags)
31 for (uns i=0; fmt[i]; i++)
43 str_count_char(const char *str, uns chr)