1/*- 2 * Copyright (c)1999 Citrus Project, 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * citrus Id: wcslen.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp 27 */ 28 29#include <sys/cdefs.h> |
30#if 0 |
31#if defined(LIBC_SCCS) && !defined(lint) 32__RCSID("$NetBSD: wcslen.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); 33#endif /* LIBC_SCCS and not lint */ |
34#endif 35__FBSDID("$FreeBSD: head/lib/libc/string/wcslen.c 92986 2002-03-22 21:53:29Z obrien $"); |
36 37#include <assert.h> 38#include <wchar.h> 39 40size_t 41wcslen(s) 42 const wchar_t *s; 43{ 44 const wchar_t *p; 45 46 p = s; 47 while (*p) 48 p++; 49 50 return p - s; 51} |