private static int indexOfAnyRulePrefix ( String ruleText ) { int result = - 1 ; if ( ruleText . length ( ) > 0 ) { int pos ; for ( String string : RULE_PREFIXES ) { pos = ruleText . indexOf ( string ) ; if ( pos != - 1 && ( result == - 1 || pos < result ) ) { result = pos ; } } } return result ; }
Searches the rule s rule text for any of the specified strings .