Import upstream 2.3.14
[packages/xinetd.git] / libs / src / str / strutil.3
1 .\"(c) Copyright 1992, 1993 by Panagiotis Tsirigotis
2 .\"All rights reserved.  The file named COPYRIGHT specifies the terms 
3 .\"and conditions for redistribution.
4 .\"
5 .\" $Id: strutil.3,v 1.1.1.1 2003/02/19 17:29:27 bbraun Exp $
6 .TH STRUTIL 3X "30 September 1992"
7 .SH NAME
8 str_find, str_casefind, str_fill, str_lower, str_upper -- string utility functions
9 .SH SYNOPSIS
10 .LP
11 .nf
12 .ft B
13 #include "str.h"
14 .LP
15 .ft B
16 char *str_find( s1, s2 )
17 char *s1, *s2 ;
18 .LP
19 .ft B
20 char *str_casefind( s1, s2 )
21 char *s1, *s2 ;
22 .LP
23 .ft B
24 void str_fill( s, c )
25 char *s ;
26 char c ;
27 .LP
28 .ft B
29 char *str_lower( s )
30 char *s ;
31 .LP
32 .ft B
33 char *str_upper( s )
34 char *s ;
35 .SH DESCRIPTION
36 .B str_find()
37 returns a pointer to the first instance of string \fIs2\fR in string \fIs1\fR.
38 If \fIs2\fR is the empty string a pointer to \fIs1\fR is returned.
39 .LP
40 .B str_casefind()
41 performs the same function as
42 .B str_find()
43 except that it performs case insensitive character comparisons.
44 .LP
45 .B str_fill()
46 fills the string \fIs\fR with the character \fIc\fR.
47 .LP
48 .B str_lower()
49 and
50 .B str_upper()
51 convert their argument in place to a lower or upper case string respectively.
52 .SH "RETURN VALUES"
53 .LP
54 \fBstr_find()\fR 
55 and
56 .B str_casefind()
57 return a pointer to the first occurrence of \fIs2\fR
58 in \fIs1\fR or
59 .SM NULL
60 if \fIs2\fR does not exist in \fIs1\fR.
61 .LP
62 \fBstr_lower()\fR and \fBstr_upper()\fR return \fIs\fR.