Android String Array Search in(String needle, String... haystack)

Here you can find the source of in(String needle, String... haystack)

Description

in

Declaration

public static boolean in(String needle, String... haystack) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean in(String needle, String... haystack) {
        for (String hay : haystack) {
            if (hay.equals(needle))
                return true;
        }//from   w w  w. j  a v  a2s .c  om
        return false;
    }
}

Related

  1. indexOf(String[] datas, String val)
  2. indexOf(String[] datas, String val)
  3. containsOnlyAlphaDigitHyphen( final Collection values)
  4. containsOnlyWhiteSpaces( final Collection values)