EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1042 background imageLoading...
Page #1042 background image
1000
Appendix A: System Routines — Strings
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
strrchr
Declaration:
char *
strrchr
(const char *
str
, int
c
);
Category(ies):
Strings
Description:
Locates the last occurrence of the character
c
in the string pointed to by
str
.
Inputs:
str
Pointer to character string.
c
Character to search for.
Outputs:
Returns a pointer to the located character, or a null pointer if
c
is not found
in
str
.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: strchr, strcspn, strspn, strstr, strpbrk, memchr
Example:
BOOL findlastchar( const char *str1, int ch, char *buf )
/* findlastchar - Return TRUE if found ch in str1 and build message in buf
indicating the last occurrence, else return FALSE.
*/
{
char *ptr;
if( ( ptr = strrchr(str1, ch)) == NULL )
return( FALSE ); /* ch not found in str1 */
sprintf( buf, "Last '%c' is found at position %d in string: %s\n",
ch, (ptr - str1 + 1), str1);
return( TRUE );
}

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals