source: buchla-68k/libsm/strlen.c@ 7258c6a

Last change on this file since 7258c6a was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Use standard integer types.

  • Property mode set to 100644
File size: 456 bytes
Line 
1/*
2 =============================================================================
3 strlen.c -- string length function ala' Unix(tm)
4 Version 1 -- 1987-02-11 -- D.N. Lynx Crowe
5
6 Returns the number of non-NULL bytes in string argument.
7 =============================================================================
8*/
9
10
11int16_t strlen(int8_t *s)
12{
13 register int16_t n = 0;
14
15 while (*s++ != '\0')
16 ++n;
17
18 return (n);
19}
Note: See TracBrowser for help on using the repository browser.