Content-type: text/html Man page of strchr

strchr

Section: Kernel Functions for Drivers (9F)
Updated: 16 Jan 2006
Index Return to Main Contents
 

NAME

strchr, strrchr - find a character in a string  

SYNOPSIS

#include <sys/ddi.h>
#include <sys/sunddi.h>

char *strchr(const char *str, int chr);

char *strrchr(const char *str, int chr);  

INTERFACE LEVEL

Solaris DDI specific (Solaris DDI).  

PARAMETERS

str Pointer to a string to be searched.

chr The character to search for.

 

DESCRIPTION

strchr()

The strchr() function returns a pointer to the first occurrence of chr in the string pointed to by str.

strrchr()

The strrchr() function returns a pointer to the last occurrence of chr in the string pointed to by str.

 

RETURN VALUES

The strchr() and strrchr() functions return a pointer to a character, or NULL, if the search fails.  

CONTEXT

These functions can be called from user, interrupt, or kernel context.  

SEE ALSO

strcmp(9F)

Writing Device Drivers


 

Index

NAME
SYNOPSIS
INTERFACE LEVEL
PARAMETERS
DESCRIPTION
RETURN VALUES
CONTEXT
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:39:41 GMT, October 02, 2010