11,6 → 11,7 |
// strpbrk(dword text1,text2) --- example: strpbrk("this test", " ckfi") -> return "is test" |
// strcmp( ESI, EDI) |
// strlen( EDI) |
// utf8_strlen( ESI) |
// strcpy( EDI, ESI) --- 0 if == |
// strncpy(dword text1,text2,signed length) |
// strcat( EDI, ESI) |
140,7 → 141,23 |
return cp - str; |
} |
|
inline fastcall unsigned int utf8_strlen( ESI) |
{ |
$xor ecx, ecx |
_loop: |
$lodsb |
$test al, al |
$jz _done |
$and al, 0xc0 |
$cmp al, 0x80 |
$jz _loop |
$inc ecx |
$jmp _loop |
|
_done: |
return ECX; |
} |
|
inline signed int strcmp(dword text1, text2) |
{ |
char s1,s2; |
916,27 → 933,6 |
} |
|
|
inline fastcall unsigned int utf8_strlen( ESI) |
{ |
$xor ecx, ecx |
_loop: |
$lodsb |
$test al, al |
$jz _done |
$test al, 0x80 |
$jz _1 |
$and al, 0xc0 |
$cmp al, 0x80 |
$jz _loop |
_1: |
$inc ecx |
$jmp _loop |
|
_done: |
return ECX; |
} |
|
|
#define strnmov strmovn |
#define stricmp strcmpi |
#define strcmpn strncmp |