Java Array Has inArray(String string, String[] strings)

Here you can find the source of inArray(String string, String[] strings)

Description

in Array

License

Open Source License

Declaration

public static boolean inArray(String string, String[] strings) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean inArray(String string, String[] strings) {
        if (string == null) {
            return false;
        }//from  w  w  w.ja  va2s  . c o  m
        for (String s : strings) {
            if (s != null && s.equalsIgnoreCase(string)) {
                return true;
            }
        }
        return false;
    }

    public static boolean inArray(int i, int[] array) {
        for (int j : array) {
            if (j == i) {
                return true;
            }
        }
        return false;
    }
}

Related

  1. inArray(int[] array, int needle)
  2. inArray(Object[] ps, Object p)
  3. inArray(String arg, String[] array)
  4. inArray(String needle, String... haystack)
  5. inArray(String str, String[] stringArray)
  6. inArray(String value, String[] s)
  7. inArray(String value, String[] values)
  8. inArray(String[] attributes, String attribute)
  9. inArray(String[] delegableOperations, String operationId)