Rev 5712 | Rev 5803 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5712 | Rev 5713 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | //------------------------------------------------------------------------------ |
9 | //------------------------------------------------------------------------------ |
10 | // strspn(dword text1,text2) --- example: strspn("12 year","1234567890") -> return 2 |
10 | // strspn(dword text1,text2) --- example: strspn("12 year","1234567890") -> return 2 |
11 | // strpbrk(dword text1,text2) --- example: strpbrk("this test", " ckfi") -> return "is test" |
11 | // strpbrk(dword text1,text2) --- example: strpbrk("this test", " ckfi") -> return "is test" |
12 | // strcmp( ESI, EDI) |
12 | // strcmp( ESI, EDI) |
13 | // strlen( EDI) |
13 | // strlen( EDI) |
- | 14 | // utf8_strlen( ESI) |
|
14 | // strcpy( EDI, ESI) --- 0 if == |
15 | // strcpy( EDI, ESI) --- 0 if == |
15 | // strncpy(dword text1,text2,signed length) |
16 | // strncpy(dword text1,text2,signed length) |
16 | // strcat( EDI, ESI) |
17 | // strcat( EDI, ESI) |
17 | // strncat(dword text1,text2,signed length) --- pasting the text of a certain length |
18 | // strncat(dword text1,text2,signed length) --- pasting the text of a certain length |
18 | // strchr( ESI,BL) --- find first BL |
19 | // strchr( ESI,BL) --- find first BL |
Line 138... | Line 139... | ||
138 | dword cp; |
139 | dword cp; |
139 | for (cp = str; (maxlen != 0) && (DSBYTE[cp] != '\0'); cp++, maxlen--); |
140 | for (cp = str; (maxlen != 0) && (DSBYTE[cp] != '\0'); cp++, maxlen--); |
140 | return cp - str; |
141 | return cp - str; |
141 | } |
142 | } |
Line -... | Line 143... | ||
- | 143 | ||
- | 144 | inline fastcall unsigned int utf8_strlen( ESI) |
|
- | 145 | { |
|
- | 146 | $xor ecx, ecx |
|
- | 147 | _loop: |
|
- | 148 | $lodsb |
|
- | 149 | $test al, al |
|
- | 150 | $jz _done |
|
- | 151 | $and al, 0xc0 |
|
- | 152 | $cmp al, 0x80 |
|
- | 153 | $jz _loop |
|
- | 154 | $inc ecx |
|
- | 155 | $jmp _loop |
|
- | 156 | ||
- | 157 | _done: |
|
- | 158 | return ECX; |
|
Line 142... | Line 159... | ||
142 | 159 | } |
|
143 | 160 | ||
144 | inline signed int strcmp(dword text1, text2) |
161 | inline signed int strcmp(dword text1, text2) |
145 | { |
162 | { |
Line 914... | Line 931... | ||
914 | itoa_(#tmpch, d_int); |
931 | itoa_(#tmpch, d_int); |
915 | debugln(#tmpch); |
932 | debugln(#tmpch); |
916 | } |
933 | } |
Line 917... | Line -... | ||
917 | - | ||
918 | - | ||
919 | inline fastcall unsigned int utf8_strlen( ESI) |
- | |
920 | { |
- | |
921 | $xor ecx, ecx |
- | |
922 | _loop: |
- | |
923 | $lodsb |
- | |
924 | $test al, al |
- | |
925 | $jz _done |
- | |
926 | $test al, 0x80 |
- | |
927 | $jz _1 |
- | |
928 | $and al, 0xc0 |
- | |
929 | $cmp al, 0x80 |
- | |
930 | $jz _loop |
- | |
931 | _1: |
- | |
932 | $inc ecx |
- | |
933 | $jmp _loop |
- | |
934 | - | ||
935 | _done: |
- | |
936 | return ECX; |
- | |
937 | } |
- | |
938 | 934 | ||
939 | 935 | ||
940 | #define strnmov strmovn |
936 | #define strnmov strmovn |
Line 941... | Line 937... | ||
941 | #define stricmp strcmpi |
937 | #define stricmp strcmpi |
942 | #define strcmpn strncmp |
938 | #define strcmpn strncmp |