4.3BSD-Tahoe/usr/man/cat3/string.0
STRING(3) UNIX Programmer's Manual STRING(3)
NNAAMMEE
strcat, strncat, strcmp, strncmp, strcasecmp, strncasecmp,
strcpy, strncpy, strlen, index, rindex - string operations
SSYYNNOOPPSSIISS
##iinncclluuddee <<ssttrriinnggss..hh>>
cchhaarr **ssttrrccaatt((ss,, aappppeenndd))
cchhaarr **ss,, **aappppeenndd;;
cchhaarr **ssttrrnnccaatt((ss,, aappppeenndd,, ccoouunntt))
cchhaarr **ss,, **aappppeenndd;;
iinntt ccoouunntt;;
ssttrrccmmpp((ss11,, ss22))
cchhaarr **ss11,, **ss22;;
ssttrrnnccmmpp((ss11,, ss22,, ccoouunntt))
cchhaarr **ss11,, **ss22;;
iinntt ccoouunntt;;
ssttrrccaasseeccmmpp((ss11,, ss22))
cchhaarr **ss11,, **ss22;;
ssttrrnnccaasseeccmmpp((ss11,, ss22,, ccoouunntt))
cchhaarr **ss11,, **ss22;;
iinntt ccoouunntt;;
cchhaarr **ssttrrccppyy((ttoo,, ffrroomm))
cchhaarr **ttoo,, **ffrroomm;;
cchhaarr **ssttrrnnccppyy((ttoo,, ffrroomm,, ccoouunntt))
cchhaarr **ttoo,, **ffrroomm;;
iinntt ccoouunntt;;
ssttrrlleenn((ss))
cchhaarr **ss;;
cchhaarr **iinnddeexx((ss,, cc))
cchhaarr **ss,, cc;;
cchhaarr **rriinnddeexx((ss,, cc))
cchhaarr **ss,, cc;;
DDEESSCCRRIIPPTTIIOONN
These functions operate on null-terminated strings. They do
not check for overflow of any receiving string.
_S_t_r_c_a_t appends a copy of string _a_p_p_e_n_d to the end of string
_s. _S_t_r_n_c_a_t copies at most _c_o_u_n_t characters. Both return a
pointer to the null-terminated result.
Printed 7/9/88 October 22, 1987 1
STRING(3) UNIX Programmer's Manual STRING(3)
_S_t_r_c_m_p compares its arguments and returns an integer greater
than, equal to, or less than 0, according as _s_1 is lexico-
graphically greater than, equal to, or less than _s_2.
_S_t_r_n_c_m_p makes the same comparison but looks at at most _c_o_u_n_t
characters. _S_t_r_c_a_s_e_c_m_p and _s_t_r_n_c_a_s_e_c_m_p are identical in
function, but are case insensitive. The returned lexico-
graphic difference reflects a conversion to lower-case.
_S_t_r_c_p_y copies string _f_r_o_m to _t_o, stopping after the null
character has been moved. _S_t_r_n_c_p_y copies exactly _c_o_u_n_t
characters, appending nulls if _f_r_o_m is less than _c_o_u_n_t char-
acters in length; the target may not be null-terminated if
the length of _f_r_o_m is _c_o_u_n_t or more. Both return _t_o.
_S_t_r_l_e_n returns the number of non-null characters in _s.
_I_n_d_e_x (_r_i_n_d_e_x) returns a pointer to the first (last)
occurrence of character _c in string _s or zero if _c does not
occur in the string. Setting _c to NULL works.
Printed 7/9/88 October 22, 1987 2