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

11
LINES

< > BotCompany Repo | #1027981 // startingWithIC_dropPrefix - only return elements starting with X (case-insensitive), drop prefix

JavaX fragment (include)

static L<S> startingWithIC_dropPrefix(Collection<S> l, fS prefix) {
  new L<S> out;
  for (S s : unnull(l))
    if (swic(s, prefix))
      out.add(substring(s, l(prefix)));
  ret out;
}

static L<S> startingWithIC_dropPrefix(S prefix, Collection<S> l) {
  ret startingWithIC_dropPrefix(l, prefix);
}

Author comment

Began life as a copy of #1008863

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027981
Snippet name: startingWithIC_dropPrefix - only return elements starting with X (case-insensitive), drop prefix
Eternal ID of this version: #1027981/1
Text MD5: ace0c1c740ccbf76150e04e0e63043fc
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-23 09:53:50
Source code size: 309 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 204 / 243
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1030950 - startingWithIC_dropAndTrim - only return elements starting with X (case-insensitive), drop prefix, trim