graveyard/tools/org/apache/axis/tools/common/Utils.java
/**
	 * Performs a C-aware version of String.indexOf(String) in
	 * that it skips characters in string literals and comments and makes
	 * sure that the target string is not embedded in a longer word.
	 */
Performs a C-aware version of String.indexOf(String) in
that it skips characters in string literals and comments and makes
sure that the target string is not embedded in a longer word.
Performs a C - aware version of String . indexOf ( String ) in that it skips characters in string literals and comments and makes sure that the target string is not embedded in a longer word .
static int indexOf(String s, String t) {
		char t0 = t.charAt(0);
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) == t0
				&& s.substring(i).startsWith(t)
				&& (0 == i || !Character.isLetterOrDigit(s.charAt(i - 1)))
				&& (s.length() == (i + t.length())
					|| !Character.isLetterOrDigit(s.charAt(i + t.length()))))
				return i;
			i = skip(s.substring(i), i);
			if (-1 == i)
				return -1;
		}
		return -1;
	}
static int indexOf ( String s , String t ) { char t0 = t . charAt ( 0 ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( s . charAt ( i ) == t0 && s . substring ( i ) . startsWith ( t ) && ( 0 == i || ! Character . isLetterOrDigit ( s . charAt ( i - 1 ) ) ) && ( s . length ( ) == ( i + t . length ( ) ) || ! Character . isLetterOrDigit ( s . charAt ( i + t . length ( ) ) ) ) ) return i ; i = skip ( s . substring ( i ) , i ) ; if ( - 1 == i ) return - 1 ; } return - 1 ; }
Performs a C-aware version of String.indexOf(String) in
 that it skips characters in string literals and comments and makes
 sure that the target string is not embedded in a longer word.
Performs a C - aware version of String . indexOf ( String ) in that it skips characters in string literals and comments and makes sure that the target string is not embedded in a longer word .