List of utility methods to do Array Contain
boolean | arrayContainsString(String[] arr, String str, boolean isCaseSensitive) check if a string is included in the array index numbers follow the convention of substring boolean found = false; if (arr != null) for (int i = 0; i < arr.length && !found; i++) { if (arr[i].equals(str) || (!isCaseSensitive && arr[i].equalsIgnoreCase(str))) found = true; return found; |
boolean | arrayContainString(String[] arrayString, String str) array Contain String if (arrayString == null || arrayString.length == 0) { return false; for (int i = 0; i < arrayString.length; i++) { if (arrayString[i].equals(str)) return true; return false; ... |
boolean | arrayIntContainsInt(int[] arrayInt, int value) savoir si un tableau d'entier contient un entier for (int i = 0; i < arrayInt.length; i++) if (arrayInt[i] == value) return true; return false; |