MCPcopy Create free account
hub / github.com/comaps/comaps / find_multilang_next

Function find_multilang_next

tools/python/mwm/mwm_python.py:366–390  ·  view source on GitHub ↗
(s, i)

Source from the content-addressed store, hash-verified

364
365def read_multilang(f) -> Dict[str, str]:
366 def find_multilang_next(s, i):
367 i += 1
368 while i < len(s):
369 try:
370 c = ord(s[i])
371 except:
372 c = s[i]
373 if c & 0xC0 == 0x80:
374 break
375 if c & 0x80 == 0:
376 pass
377 elif c & 0xFE == 0xFE:
378 i += 6
379 elif c & 0xFC == 0xFC:
380 i += 5
381 elif c & 0xF8 == 0xF8:
382 i += 4
383 elif c & 0xF0 == 0xF0:
384 i += 3
385 elif c & 0xE0 == 0xE0:
386 i += 2
387 elif c & 0xC0 == 0xC0:
388 i += 1
389 i += 1
390 return i
391
392 s = read_string(f, decode=False)
393 langs = {}

Callers 1

read_multilangFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected