Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1024074 // codepoints - list of codepoints in string

JavaX fragment (include)

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: 246 / 259
Referenced in: [show references]