| 1254 | #endif |
| 1255 | |
| 1256 | txSize fxUnicodeToUTF8Offset(txString theString, txSize theOffset) |
| 1257 | { |
| 1258 | txU1* p = (txU1*)theString; |
| 1259 | txU1 c; |
| 1260 | txSize unicodeOffset = 0; |
| 1261 | txSize utf8Offset = 0; |
| 1262 | |
| 1263 | while ((c = c_read8(p++))) { |
| 1264 | if ((c & 0xC0) != 0x80) { |
| 1265 | if (unicodeOffset == theOffset) |
| 1266 | return utf8Offset; |
| 1267 | unicodeOffset++; |
| 1268 | } |
| 1269 | utf8Offset++; |
| 1270 | } |
| 1271 | if (unicodeOffset == theOffset) |
| 1272 | return utf8Offset; |
| 1273 | else |
| 1274 | return -1; |
| 1275 | } |
| 1276 | |
| 1277 | txFlag fxIntegerToIndex(void* the, txInteger theInteger, txIndex* theIndex) |
| 1278 | { |
no outgoing calls
no test coverage detected