1 | static LS tok_joinExtendedUnicodes(LS tok) { |
2 | new LS tok2; |
3 | for i over tok: { |
4 | S t = tok.get(i); |
5 | if (odd(i) && isHighSurrogate(t) |
6 | && empty(tok.get(i+1)) |
7 | && isLowSurrogate(get(tok, i+2))) { |
8 | tok2.add(tok.get(i) + tok.get(i+2)); |
9 | i += 2; |
10 | } else |
11 | tok2.add(t); |
12 | } |
13 | ret tok2; |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021711 |
Snippet name: | tok_joinExtendedUnicodes |
Eternal ID of this version: | #1021711/1 |
Text MD5: | c7f53ef141d32db90f4afb7a3e253d47 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-24 18:34:32 |
Source code size: | 327 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 266 / 302 |
Referenced in: | [show references] |