Appendix A: System Routines — Strings
989
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
strcat
Declaration:
char *
strcat
(char *
s1
, const char *
s2
)
Category(ies):
Strings
Description:
Appends a copy of the string pointed to by
s2
to the end of the string
pointed to by
s1
, overwriting the null character terminating the string
pointed to by
s1
.
Inputs:
s1
— Character string.
s2
— Character string to append.
Outputs:
Returns the new value of string
s1.
Assumptions:
s1
points to a buffer large enough to hold the concatenated string.
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: strncat
Example:
void ValToStr( char *Buf, BCD16 *Val )
{ /* Format floating point Val as a string and append to Buf */
Access_AMS_Global_Variables;
HANDLE hText;
EStackIndex OldTop;
if (!is_float_transfinite(*Val)) {
OldTop = top_estack;
push_Float( *Val );
hText = Parse1DExpr(top_estack, FALSE, 0);
top_estack = OldTop;
if (hText != H_NULL {
strcat( Buf, " = " );
strcat( Buf, HeapDeref(hText) ); /* Buf contains . . . . = #### */
HeapFree( hText );
}
}
}