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

21
LINES

< > BotCompany Repo | #1002148 // containsIgnoreCase

JavaX fragment (include)

sbool containsIgnoreCase(Collection<S> l, S s) {
  if (l != null) for (S x : l)
    if (eqic(x, s))
      ret true;
  ret false;
}

static boolean containsIgnoreCase(S[] l, S s) {
  if (l != null) for (S x : l)
    if (eqic(x, s))
      ret true;
  ret false;
}

static boolean containsIgnoreCase(S s, char c) {
  ret indexOfIgnoreCase(s, String.valueOf(c)) >= 0;
}

static boolean containsIgnoreCase(S a, S b) {
  ret indexOfIgnoreCase(a, b) >= 0;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1002148
Snippet name: containsIgnoreCase
Eternal ID of this version: #1002148/4
Text MD5: 90cbcf663fdd5202a584d5e11c87899e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-14 16:10:26
Source code size: 470 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 728 / 1937
Version history: 3 change(s)
Referenced in: #1002149 - removeIgnoreCase
#1002427 - Accellerating 629 (SPIKE)
#1002990 - contains - like Collection.contains, but allows a null collection and arrays. also for strings
#1003329 - cic - short for containsIgnoreCase
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1011408 - containsLispIC
#1018146 - cicAtOddPosition
#3000382 - Answer for ferdie (>> t = 1, f = 0)