Back to index

glibc  2.9
wcsdup.c File Reference
#include <wchar.h>
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.


wchar_t * wcsdup (wchar_t *s) const

Function Documentation

wchar_t* wcsdup ( wchar_t *  s) const

Definition at line 27 of file wcsdup.c.

  size_t len = (__wcslen (s) + 1) * sizeof (wchar_t);
  void *new = malloc (len);

  if (new == NULL)
    return NULL;

  return (wchar_t *) memcpy (new, (void *) s, len);

Here is the call graph for this function: