Android String Array Search indexOf(String[] datas, String val)

Here you can find the source of indexOf(String[] datas, String val)

Description

index Of

Declaration

public static int indexOf(String[] datas, String val) 

Method Source Code

//package com.java2s;

public class Main {
    public static int indexOf(String[] datas, String val) {
        if (val != null) {
            for (int i = 0; i < datas.length; i++) {
                if (datas[i].equals(val)) {
                    return i;
                }/*  w w w  .j  a v a2 s .  c o  m*/
            }
        }
        return -1;
    }
}

Related

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