Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6557 serge 1
/*
2
FUNCTION
3
	<>---search for character in string
4
 
5
INDEX
6
	index
7
 
8
ANSI_SYNOPSIS
9
	#include 
10
	char * index(const char *<[string]>, int <[c]>);
11
 
12
TRAD_SYNOPSIS
13
	#include 
14
	char * index(<[string]>, <[c]>);
15
	char *<[string]>;
16
	int *<[c]>;
17
 
18
DESCRIPTION
19
	This function finds the first occurence of <[c]> (converted to
20
	a char) in the string pointed to by <[string]> (including the
21
	terminating null character).
22
 
23
	This function is identical to <>.
24
 
25
RETURNS
26
	Returns a pointer to the located character, or a null pointer
27
	if <[c]> does not occur in <[string]>.
28
 
29
PORTABILITY
30
<> requires no supporting OS subroutines.
31
 
32
QUICKREF
33
	index - pure
34
*/
35
 
36
#include 
37
#include 
38
 
39
char *
40
_DEFUN (index, (s, c),
41
	_CONST char *s _AND
42
	int c)
43
{
44
  return strchr (s, c);
45
}