update for HEAD-2003091401
[reactos.git] / lib / ntdll / string / wstring.c
index d2c18ec..9aa2ef1 100644 (file)
@@ -31,6 +31,9 @@ int _wcsicmp (const wchar_t* cs, const wchar_t * ct)
 }
 
 
+/*
+ * @implemented
+ */
 wchar_t *_wcslwr (wchar_t *x)
 {
        wchar_t *y=x;
@@ -43,6 +46,9 @@ wchar_t *_wcslwr (wchar_t *x)
 }
 
 
+/*
+ * @implemented
+ */
 int _wcsnicmp (const wchar_t * cs, const wchar_t * ct, size_t count)
 {
        if (count == 0)
@@ -57,6 +63,9 @@ int _wcsnicmp (const wchar_t * cs, const wchar_t * ct, size_t count)
 }
 
 
+/*
+ * @implemented
+ */
 wchar_t *_wcsupr(wchar_t *x)
 {
        wchar_t  *y=x;
@@ -68,60 +77,9 @@ wchar_t *_wcsupr(wchar_t *x)
        return x;
 }
 
-
-wchar_t *wcscat (wchar_t *dest, const wchar_t *src)
-{
-  int i, j;
-
-  for (j = 0; dest[j] != 0; j++)
-    ;
-  for (i = 0; src[i] != 0; i++)
-    {
-      dest[j + i] = src[i];
-    }
-  dest[j + i] = 0;
-
-  return dest;
-}
-
-wchar_t *wcschr (const wchar_t *str, wchar_t ch)
-{
-  while ((*str) != ((wchar_t) 0))
-    {
-      if ((*str) == ch)
-        {
-          return (wchar_t *)str;
-        }
-      str++;
-    }
-
-  return NULL;
-}
-
-int wcscmp(const wchar_t *cs, const wchar_t *ct)
-{
-  while (*cs != '\0' && *ct != '\0' && *cs == *ct)
-    {
-      cs++;
-      ct++;
-    }
-  return *cs - *ct;
-}
-
-wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2)
-{
-   wchar_t* s = str1;
-   while ((*str2)!=0)
-     {
-       *s = *str2;
-       s++;
-       str2++;
-     }
-   *s = 0;
-   return(str1);
-}
-
-
+/*
+ * @implemented
+ */
 size_t wcscspn(const wchar_t *str,const wchar_t *reject)
 {
        wchar_t *s;
@@ -141,70 +99,9 @@ size_t wcscspn(const wchar_t *str,const wchar_t *reject)
        return s-str; /* nr of wchars */
 }
 
-
-size_t wcslen(const wchar_t *s)
-{
-  unsigned int len = 0;
-
-  while (s[len] != 0)
-    {
-      len++;
-    }
-
-  return len;
-}
-
-wchar_t *wcsncat(wchar_t *dest, const wchar_t *src, size_t count)
-{
-  int i, j;
-
-  for (j = 0; dest[j] != 0; j++)
-    ;
-  for (i = 0; i < count; i++)
-    {
-      dest[j + i] = src[i];
-      if (src[i] == 0)
-        {
-          return dest;
-        }
-    }
-  dest[j + i] = 0;
-
-  return dest;
-}
-
-
-int wcsncmp(const wchar_t * cs,const wchar_t * ct,size_t count)
-{
-  while ((*cs) == (*ct) && count > 0)
-  {
-    if (*cs == 0)
-      return 0;
-    cs++;
-    ct++;
-    count--;
-  }
-  return (*cs) - (*ct);
-}
-
-
-wchar_t* wcsncpy(wchar_t *dest, const wchar_t *src, size_t count)
-{
-  int i;
-   
-  for (i = 0; i < count; i++)
-    {
-      dest[i] = src[i];
-      if (src[i] == 0)
-        {
-          return dest;
-        }
-    }
-
-  return dest;
-}
-
-
+/*
+ * @implemented
+ */
 wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2)
 {
   const wchar_t *scanp;
@@ -221,27 +118,9 @@ wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2)
   return 0;
 }
 
-
-wchar_t * wcsrchr(const wchar_t *str, wchar_t ch)
-{
-  unsigned int len = 0;
-  while (str[len] != ((wchar_t)0))
-    {
-      len++;
-    }
-   
-  for (; len > 0; len--)
-    {
-      if (str[len-1]==ch)
-        {
-          return (wchar_t *) &str[len - 1];
-        }
-    }
-
-  return NULL;
-}
-
-
+/*
+ * @implemented
+ */
 size_t wcsspn(const wchar_t *str,const wchar_t *accept)
 {
        wchar_t  *s;
@@ -262,6 +141,9 @@ size_t wcsspn(const wchar_t *str,const wchar_t *accept)
 }
 
 
+/*
+ * @implemented
+ */
 wchar_t *wcsstr(const wchar_t *s,const wchar_t *b)
 {
        wchar_t *x;