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

5
LINES

< > BotCompany Repo | #1035404 // resolveKeyCI - find key using case-insensitive search

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

Libraryless. Click here for Pure Java version (7881L/44K).

static <A> S resolveKeyCI(Map<S, A> map, S key) {
  if (map == null) null;
  if (map.containsKey(key)) ret key;
  ret first(keys(map), k -> eqic(key, k));
}

Author comment

Began life as a copy of #1030854

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035404
Snippet name: resolveKeyCI - find key using case-insensitive search
Eternal ID of this version: #1035404/1
Text MD5: 41e9f70c2882b6bd791fdb9bb03faef2
Transpilation MD5: 453c01f42ce0ce72acd6de5cd7e050b0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-05-06 15:30:12
Source code size: 162 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 123 / 175
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)