cfunc.saddr C Macro/C Functions

cfunc.saddr

Command cfunc.saddr C Macro/C Functions
Applicable release versions: AP 6.1
Category C Functions (120)
Description returns a standard char* pointing to the first character of the string buffer within a CPSTR structure.

Because _CP_SADDR is a macro, it may be used either on the left-hand or the right-hand side of an assignment operator.
Syntax char* _CP_SADDR(CPSTR* string)
Options
Example
CPSTR * s = _CP_mkstr("hi");
_CP_SADDR(s)[1] = 'o';          /* replace 2nd character  */
_CP_unix_env();                 /* Unix print environment */
_CP_TERM(s);                    /* null terminate */
printf("%sn",_CP_SADDR(s));
Purpose
Related cfunc.introduction
cfunc.slen