strlen.c 502 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (C) 2002 Manuel Novoa III
  3. * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. #include "_string.h"
  8. #ifdef WANT_WIDE
  9. # define __Wstrlen __wcslen
  10. # define Wstrlen wcslen
  11. #else
  12. # define __Wstrlen __strlen
  13. # define Wstrlen strlen
  14. #endif
  15. size_t attribute_hidden __Wstrlen(const Wchar *s)
  16. {
  17. register const Wchar *p;
  18. for (p=s ; *p ; p++);
  19. return p - s;
  20. }
  21. strong_alias(__Wstrlen,Wstrlen)