aboutsummaryrefslogtreecommitdiff
path: root/sys/libc/strlen.c
blob: c6c2f813a0e55fd4e9fe7b75b13cbc24335dee6e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
 */

#define	import_libc
#include <iraf.h>


/* STRLEN -- Length of a string.
*/
int
strlen (
  char	*s
)
{
	register char	*ip=s;

	while (*ip++)
	    ;

	return (ip - s - 1);
}