strlen, _fstrlen
raw OCR
Calculates the length of a string.
Defined in header <string.h>
Syntax
#include <string.h>
Near version: size_t strlen(const char *s);
Far version: size_t _fstrlen(const char far *s)
Portability
| DOS | UNIX | Windows | ANSI C | C++ only | |
|---|---|---|---|---|---|
| Near version | ■ | ■ | ■ | ■ | |
| ■ | ■ |
Remarks
strlen calculates the length of s.
Return value
strlen returns the number of characters in s, not counting the null-terminating character.
Example
#include <stdio.h>
#include <string.h>
int main (void)
{
char *string "Borland International";
printf ("%d\n" strlen(string));
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/string.h/strlen/
· short form /3.1/strlen/