waterml/src/main/java/ucar/nc2/ogc/erddap/util/ErddapString2.java
public static int indexOf(char[] cArray, char c, int fromIndex) {
        int cArrayLength = cArray.length;
        for (int index = Math.max(fromIndex, 0); index < cArrayLength; index++) {
            if (cArray[index] == c) 
                return index;
        }
        return -1;
    }
public static int indexOf(char[] cArray, char c, int fromIndex) {
        int cArrayLength = cArray.length;
        for (int index = Math.max(fromIndex, 0); index < cArrayLength; index++) {
            if (cArray[index] == c) 
                return index;
        }
        return -1;
    }
Finds the first instance of c at or after fromIndex (0.. ) in cArray.

@param cArray
@param c the char you want to find
@param fromIndex the index number of the position to start the search
@return The first instance of c. If not found, it returns -1.