make armeb specific header (set AROS_BIG_ENDIAN to one)
[AROS.git] / compiler / stdc / strlen.c
blob3539573566274f2779118e977eb860813a1f563e
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function strlen().
6 */
8 /*****************************************************************************
10 NAME */
11 #include <string.h>
13 size_t strlen (
15 /* SYNOPSIS */
16 const char * ptr)
18 /* FUNCTION
19 Calculate the length of a string (without the terminating 0 byte).
21 INPUTS
22 ptr - The string to get its length for
24 RESULT
25 The length of the string.
27 NOTES
29 EXAMPLE
31 BUGS
33 SEE ALSO
35 INTERNALS
37 ******************************************************************************/
39 const char * start = ptr;
41 while (*ptr) ptr ++;
43 return (((long)ptr) - ((long)start));
44 } /* strlen */