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 #1037 background imageLoading...
Page #1037 background image
Appendix A: System Routines — Strings
995
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
strlen
Declaration:
size_t
strlen
(const char *
str
)
Category(ies):
Strings
Description:
Returns the length in bytes of the string pointed to by
str
, not counting the
terminating null character.
Inputs:
str
Character string.
Outputs:
Length of the string pointed to by
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: strspn
,
strcspn
Example:
void hStrAppend( HANDLE hStr1, UCHAR *pStr2 )
/* hStrAppend - append string to a handle.
input: hStr1 = handle to string to be lengthened,
pStr2 = string to append to handle.
*/
{
UCHAR *pStr1;
ULONG lStr1, lStr2, lBuf;
pStr1 = HeapDeref(hStr1);
lStr1 = strlen((char *)pStr1); /* find length of string in handle */
lStr2 = strlen((char *)pStr2); /* length of string to append */
lBuf = lStr1 + lStr2 + 1; /* calc new space requirement */
if (HeapRealloc(hStr1, lBuf) == 0) /* try to get new space */
ER_throw(ER_MEMORY);
pStr1 = (UCHAR *)HeapDeref(hStr1) + lStr1; /* point to end of original string */
memcpy(pStr1, pStr2, lStr2+1); /* append new string */
}

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