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

19
LINES

< > BotCompany Repo | #1021627 // simpleUnicodeEmojiList

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3540L/24K/83K).

!7

// keys = unicode, values = keywords
static cached Map<S, Set<S>> simpleUnicodeEmojiList() {
  S json = gunzipTextSnippet(#1400186);
  Map map = jsonDecodeMap(json);
  //pnl(keys(map));
  Map<S, Set<S>> emojis = new TreeMap;
  for (L<Map<S, O>> l : (Collection<L<Map<S, O>>>) values(map)) {
    for (Map<S, O> item : l) {
      S code = getString code(item);
      if (containsSpace(code)) continue; // skip those for now
      LS keywords = cast _get keywords(item); // this version of get is new in x30
      print(code + " = " + joinWithSpacedPlus(keywords));
      emojis.put(textualCodePointToString(code), asLinkedHashSet(keywords));
    }
  }
  ret emojis;
}

Author comment

Began life as a copy of #1021623

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: #1021627
Snippet name: simpleUnicodeEmojiList
Eternal ID of this version: #1021627/4
Text MD5: 552cd6841a28c47f1fd84909de816ae9
Transpilation MD5: b674b896038d3e7344a0062955bade15
Author: stefan
Category: javax / unicode
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-23 11:08:57
Source code size: 687 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 320 / 410
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)