STRING(3) STRING(3) NAME strcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen, index, rindex - string operations SYNOPSIS #include char *strcat(s1, s2) char *s1, *s2; char *strncat(s1, s2, n) char *s1, *s2; strcmp(s1, s2) char *s1, *s2; strncmp(s1, s2, n) char *s1, *s2; char *strcpy(s1, s2) char *s1, *s2; char *strncpy(s1, s2, n) char *s1, *s2; strlen(s) char *s; char *index(s, c) char *s, c; char *rindex(s, c) char *s, c; DESCRIPTION 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 _s_2 to the end of string _s_1. _S_t_r_n_c_a_t copies at most _n characters. Both return a pointer to the null-termiā€ nated result. _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 lexicographically 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 _n characters. _S_t_r_c_p_y copies string _s_2 to _s_1_, stopping after the null character has been moved. _S_t_r_n_c_p_y copies exactly _n characters, truncating or null- padding _s_2_; the target may not be null-terminated if the length of _s_2 is _n or more. Both return _s_1. _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. 4th Berkeley Distribution May 15, 1985 STRING(3)