DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_strchr, udi_strrchr, udi_memchr


String/memory searching

SYNOPSIS

#include <udi.h>
char *udi_strchr (

	const char *s,

	char c );
 
char *udi_strrchr (

	const char *s,

	char c );
 
void *udi_memchr (

	const void *s,

	udi_ubit8_t c,

	udi_size_t n );
 

ARGUMENTS s is a pointer to the string or memory area to be searched.

c is the character to search for.

n is the maximum number of bytes to search.

DESCRIPTION The udi_strchr function returns a pointer to the first occurrence of the character c in the null-terminated string s.

The udi_strrchr function return a pointer to the last occurrence of the character c in the null-terminated string s.

The udi_memchr function returns a pointer to the first occurrence of the (unsigned character) byte c in the specified memory region, regardless of null bytes.

RETURN VALUES These functions return a pointer to the matched character or NULL if the character is not found.


UDI Core Specification Contents