Strcpy - Texas Instruments TI-89 Developer's Manual

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

Advertisement

992

strcpy

Declaration:
char * strcpy (char * s1 , const char * s2 )
Category(ies):
Strings
Description:
Copies the string pointed to by s2 to the buffer pointed to by s1 . If the
objects pointed to by s1 and s2 overlap in memory, the behavior is
undefined.
s1 — Buffer to copy to.
Inputs:
s2 — String to be copied into s1.
Outputs:
Returns the value of s1.
Assumptions:
s1 points to a buffer large enough to hold s2.
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also:
strncpy, memcpy, memmove
Example:
void gr_seq_axes_lbl( SBYTE ax, char buf[] )
/* Create requested string in buf for sequence axes labels.
input:
ax = -1 = n
= 0 = u
> 0 = u1 - u99
buf = buffer for string
*/
{
if( ax < 0 )
strcpy( buf, "n" );
else
{
strcpy( buf, "u" );
if( ax )
sprintf( buf + 1, "%d", (BYTE)ax );
}
}
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Strings
/* n is on this axis */
/* want u or u1-u99 */
/* need to add 1-99 to string */
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