public static int indexOfLeft ( String str , int from , char c ) { int pos = - 1 ; int f = from ; while ( f >= 0 && pos == - 1 ) if ( str . charAt ( f -- ) == c ) pos = f + 1 ; return pos ; }
Returns the position for char c in string str starting from position pos and searching towards the string beginning