_CP_locate

_CP_locate


_CP_load Index Level _CP_lock
Syntax int _CP_locate(int* result, CPSTR* string1, CPSTR* string2, int ac.expression, int vc.expression, int start.expression, int * position.variable, CPSTR* string3)
Category C Interface
Type C Function
Description equivalent to the FlashBASIC statement: locate(string1, string2, ac.expression, vc.expression, start.expression, position.variable, string3) then result = 1 else result = 0

This function returns -1 if an error occurs. The error code is contained in _CP_errno.
Options
See Also C Functions introduction
Example /* The following example prints "1 2". */

CPSTR * s = _CP_mkstr("a\376b");
CPSTR * t = _CP_mkstr("b");
int r,l;

_CP_locate(&r,t,s,0,0,0,&l,_CP_str_null);
_CP_unix_env();
printf("%d %d\n", r, l);
Warnings
Compatibility AP 6.1
_CP_load Index Level _CP_lock