| 356 | } |
| 357 | |
| 358 | static SQInteger _string_startswith(HSQUIRRELVM v) |
| 359 | { |
| 360 | const SQChar *str,*cmp; |
| 361 | sq_getstring(v,2,&str); |
| 362 | sq_getstring(v,3,&cmp); |
| 363 | SQInteger len = sq_getsize(v,2); |
| 364 | SQInteger cmplen = sq_getsize(v,3); |
| 365 | SQBool ret = SQFalse; |
| 366 | if(cmplen <= len) { |
| 367 | ret = memcmp(str,cmp,sq_rsl(cmplen)) == 0 ? SQTrue : SQFalse; |
| 368 | } |
| 369 | sq_pushbool(v,ret); |
| 370 | return 1; |
| 371 | } |
| 372 | |
| 373 | static SQInteger _string_endswith(HSQUIRRELVM v) |
| 374 | { |
nothing calls this directly
no test coverage detected