]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/string.c
XML: Brief documentation of LibUCW-XML
[libucw.git] / ucw / string.c
index 0ccbdfb5ff14625a114dc1e8a2bbfc91aad90823..29cfa42b5e50699de6fd5f4e62645fbb380c8d15 100644 (file)
 
 #undef LOCAL_DEBUG
 
-#include "ucw/lib.h"
-#include "ucw/string.h"
+#include <ucw/lib.h>
+#include <ucw/string.h>
 
 #ifdef CONFIG_DARWIN
-uns
-strnlen(const char *str, uns n)
+size_t
+strnlen(const char *str, size_t n)
 {
   const char *end = str + n;
   const char *c;
@@ -25,10 +25,10 @@ strnlen(const char *str, uns n)
 #endif
 
 char *
-str_format_flags(char *dest, const char *fmt, uns flags)
+str_format_flags(char *dest, const char *fmt, uint flags)
 {
   char *start = dest;
-  for (uns i=0; fmt[i]; i++)
+  for (uint i=0; fmt[i]; i++)
     {
       if (flags & (1 << i))
        *dest++ = fmt[i];
@@ -39,11 +39,11 @@ str_format_flags(char *dest, const char *fmt, uns flags)
   return start;
 }
 
-uns
-str_count_char(const char *str, uns chr)
+size_t
+str_count_char(const char *str, uint chr)
 {
   const byte *s = str;
-  uns i = 0;
+  size_t i = 0;
   while (*s)
     if (*s++ == chr)
       i++;