| _CP_rs_ | Index Level | _CP_select |
| Syntax | char* _CP_SADDR(CPSTR* string) |
| Category | C Interface |
| Type | C Macro |
| 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. |
| Options | |
| See Also | C Functions introduction _CP_SLEN |
| 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("%s\n",_CP_SADDR(s)); |
| Warnings | The char* that _CP_SADDR returns is NOT necessarily null-terminated. |
| Compatibility | AP 6.1 |
| _CP_rs_ | Index Level | _CP_select |