Memchr - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

976

memchr

Declaration:
void * memchr (const void * buf , int value , size_t count )
Category(ies):
Strings, Utilities
Description:
Searches the first count bytes of the block pointed to by buf for the byte
value.
buf
Inputs:
value — Value to search for.
count — Number of bytes to search.
Outputs:
A pointer to the byte value found or NULL if the value was not found.
None
Assumptions:
None
Side Effects:
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also:
memcmp, strchr
Example:
The following routine, strnlen, returns the length of a string but stops at
maxlen characters.
short strnlen( char *str, short maxlen )
{
char *match;
if (match = memchr( str, 0, maxlen ))
return ( match - str );
else
return maxlen;
}
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Strings
— Buffer to search.
Not for Distribution
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents