[0m


STRING(3)	    UNIX Programmer's Manual		STRING(3)



[1mNAME
     [0mstrcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen,
     index, rindex, strtok - string operations

[1mSYNOPSIS
     #include <strings.h>

     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;

     char *strtok(s1, s2)
     char *s1, *s2;

DESCRIPTION
     [0mThese 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-terminated 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 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 _n
     characters.





Printed 25/11/91    Revision 1.3 of 01/07/90			1






STRING(3)	    UNIX Programmer's Manual		STRING(3)



     _S_t_r_c_p_y copies string _s_2 to _s_1, stopping after the null char-
     acter 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.

     _S_t_r_t_o_k considers the string _s_1 to consist of a sequence of
     zero or more text tokens separated by spans of one or more
     characters from the separator string _s_2. The first call
     (with pointer _s_1 specified) returns a pointer to the first
     character of the first token, and will have written a NULL
     character into _s_1 immediately following the returned token.
     The function keeps track of its position in the string
     between separate calls, so that subsequent calls (which must
     be made with the first argument a NULL pointer) will work
     through the string _s_1 immediately following that token.  In
     this way subsequent calls will work through the string _s_1
     until no tokens remain.  The separator string _s_2 may be dif-
     ferent from call to call.	When no token remains in _s_1, a
     NULL pointer is returned.





























Printed 25/11/91    Revision 1.3 of 01/07/90			2



[0m