| 1156 | #endif |
| 1157 | |
| 1158 | txSize fxUTF8ToUnicodeOffset(txString theString, txSize theOffset) |
| 1159 | { |
| 1160 | txU1* p = (txU1*)theString; |
| 1161 | txU1 c; |
| 1162 | txSize unicodeOffset = 0; |
| 1163 | txSize utf8Offset = 0; |
| 1164 | |
| 1165 | while ((c = c_read8(p++))) { |
| 1166 | if ((c & 0xC0) != 0x80) { |
| 1167 | if (utf8Offset == theOffset) |
| 1168 | return unicodeOffset; |
| 1169 | unicodeOffset++; |
| 1170 | } |
| 1171 | utf8Offset++; |
| 1172 | } |
| 1173 | if (utf8Offset == theOffset) |
| 1174 | return unicodeOffset; |
| 1175 | else |
| 1176 | return -1; |
| 1177 | } |
| 1178 | |
| 1179 | #if 1 |
| 1180 | txSize fxUnicodeLength(txString theString, txSize* byteLength) |
no outgoing calls
no test coverage detected