Here you can find the source of indexOfCS(String[] strings, String a)
public static int indexOfCS(String[] strings, String a)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static final int NOT_FOUND = -1; public static int indexOfCS(String[] strings, String a) { for (int i = 0; i < strings.length; i++) { if (strings[i].equals(a)) return i; }/*from w w w . j ava 2s.c o m*/ return NOT_FOUND; } public static int indexOfCS(List<String> strings, String a) { int i = 0; for (String b : strings) { if (b.equals(a)) return i; i++; } return NOT_FOUND; } }