_CP_oconv

_CP_oconv


_CP_occurs Index Level _CP_open
Syntax int _CP_oconv(CPSTR** result, CPSTR* string1, CPSTR* string2)
Category C Interface
Type C Function
Description equivalent to the following FlashBASIC statement: result = oconv(string1, string2)

This function returns -1 if an error occurs. The error code is contained in _CP_errno.
Options
See Also C Functions introduction
Example CPSTR * s = _CP_mkstr("a2");
CPSTR * t = _CP_mkstr("mca");

_CP_oconv(&s,s,t);
_CP_print(s);
Prints "a".
Warnings This function is provided for convenience only.  It is fairly expensive as it must parse the format string (string2) at run-time (which is also true of the Unix printf() function). Unless contact with the Pick environment is absolutely required for the conversion, it is suggested that users write their own formatting routines to address their specific requirements in a more efficient manner.
Compatibility AP 6.1
_CP_occurs Index Level _CP_open