PWB1/usr/man/man3/string.3

.th STRING III 5/31/77
.sh NAME
strcpy, strcat, strcmp, strlen \*- operations on ASCII strings
.sh SYNOPSIS
.nf
.bd "strcpy(s1, s2)"
.bd "char *s1, *s2;"
.s3
.bd "strcat(s1, s2)"
.bd "char *s1, *s2;"
.s3
.bd "strcmp(s1, s2)"
.bd "char *s1, *s2;"
.s3
.bd "strlen(s)"
.bd "char *s;"
.fi
.sh DESCRIPTION
.it strcpy
.br
The null-terminated character string
.it s2
is copied to the location pointed to by
.it s1.
The space pointed to by
.it s1
must be large enough.
.s3
.it strcat
.br
The end (null byte) of
.it s1
is found and
.it s2
is copied to
.it s1
starting there.
The space pointed to by
.it s1
must be large enough.
.s3
.it strcmp
.br
The character strings
.it s1
and
.it s2
are compared.
The result is positive, zero, or negative, depending on whether
.it s1
is greater than, equal to, or less than
.it s2
(according to the ASCII collating sequence), respectively.
.s3
.it strlen
.br
The number of bytes in
.it s
up to but not including a null byte is returned.