static L<Int> codepoints(S s) { int n = l(s); new L<Int> out; for (int offset = 0; offset < n; ) { int codepoint = s.codePointAt(offset); out.add(codepoint); offset += Character.charCount(codepoint); } ret out; }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024074 |
Snippet name: | codepoints - list of codepoints in string |
Eternal ID of this version: | #1024074/1 |
Text MD5: | 9a17d67468fd1a048bc344b8c5522d14 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-20 01:35:07 |
Source code size: | 243 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 247 / 260 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1026047 - unicodeToCodePoint - get first code point |