public int findFirst ( String str , String search ) { return ( str == null || search == null ) ? - 1 : str . indexOf ( search ) ; }
Finds the index of the first occurrence of the given search string in the source string or - 1 if not found .