124139Sjoerg/*-
224139Sjoerg * Copyright (c)1999 Citrus Project,
324139Sjoerg * All rights reserved.
424139Sjoerg *
524139Sjoerg * Redistribution and use in source and binary forms, with or without
624139Sjoerg * modification, are permitted provided that the following conditions
724139Sjoerg * are met:
824139Sjoerg * 1. Redistributions of source code must retain the above copyright
924139Sjoerg *    notice, this list of conditions and the following disclaimer.
1024139Sjoerg * 2. Redistributions in binary form must reproduce the above copyright
1124139Sjoerg *    notice, this list of conditions and the following disclaimer in the
1224139Sjoerg *    documentation and/or other materials provided with the distribution.
1324139Sjoerg *
1424139Sjoerg * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1524139Sjoerg * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1624139Sjoerg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1724139Sjoerg * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1824139Sjoerg * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1924139Sjoerg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2024139Sjoerg * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2124139Sjoerg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2224139Sjoerg * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2324139Sjoerg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2424139Sjoerg * SUCH DAMAGE.
2524139Sjoerg *
2624139Sjoerg *	citrus Id: wcslen.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp
2724139Sjoerg */
2824139Sjoerg
2924139Sjoerg#include <sys/cdefs.h>
3024139Sjoerg#if 0
3124139Sjoerg#if defined(LIBC_SCCS) && !defined(lint)
3224139Sjoerg__RCSID("$NetBSD: wcslen.c,v 1.1 2000/12/23 23:14:36 itojun Exp $");
3324139Sjoerg#endif /* LIBC_SCCS and not lint */
3424139Sjoerg#endif
3524139Sjoerg__FBSDID("$FreeBSD: releng/10.2/lib/libc/string/wcslen.c 188080 2009-02-03 17:58:20Z danger $");
3624139Sjoerg
3724139Sjoerg#include <wchar.h>
3824139Sjoerg
3924139Sjoergsize_t
4024139Sjoergwcslen(const wchar_t *s)
4124139Sjoerg{
4224139Sjoerg	const wchar_t *p;
4324139Sjoerg
4424139Sjoerg	p = s;
4524139Sjoerg	while (*p)
4624139Sjoerg		p++;
4724139Sjoerg
4824139Sjoerg	return p - s;
4924139Sjoerg}
5024139Sjoerg