Java Array Contain arrayContainString(String[] arrayString, String str)

Here you can find the source of arrayContainString(String[] arrayString, String str)

Description

array Contain String

License

Apache License

Declaration

public static boolean arrayContainString(String[] arrayString, String str) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static boolean arrayContainString(String[] arrayString, String str) {
        if (arrayString == null || arrayString.length == 0) {
            return false;
        }/*from   www  .  j  a v  a2  s.  c  o m*/
        for (int i = 0; i < arrayString.length; i++) {
            if (arrayString[i].equals(str))
                return true;
        }
        return false;
    }
}

Related

  1. arrayContainsOK(final byte[] b)
  2. arrayContainsOnlyIgnoreCase(String[] array, String... strs)
  3. arrayContainsOverlap(Object[] array1, Object[] array2)
  4. arrayContainsPartKey(String[] array, String key)
  5. arrayContainsString(String[] arr, String str, boolean isCaseSensitive)
  6. arrayIntContainsInt(int[] arrayInt, int value)