private static int doTextSearch(final Object element,final String lineText,final int lineCounter,final String localSearchString,final int startPosition,final boolean caseSensitive,final List<SearchResult> results){
  final int index=lineText.indexOf(caseSensitive ? localSearchString : localSearchString.toLowerCase(),startPosition);
  if (index == -1) {
    return -1;
  }
 else {
    results.add(new SearchResult(element,lineCounter,index,localSearchString.length()));
    return index + localSearchString.length();
  }
}

private static int doTextSearch ( final Object element , final String lineText , final int lineCounter , final String localSearchString , final int startPosition , final boolean caseSensitive , final List < SearchResult > results ) { final int index = lineText . indexOf ( caseSensitive ? localSearchString : localSearchString . toLowerCase ( ) , startPosition ) ; if ( index == - 1 ) { return - 1 ; } else { results . add ( new SearchResult ( element , lineCounter , index , localSearchString . length ( ) ) ) ; return index + localSearchString . length ( ) ; } }
performs a normal search on a single line .
