static int nextNonDigit ( String str , int i ) {
  while ( i < str . length ( ) && isDigit ( str . charAt ( i ) ) ) {
    i ++ ;
  }
  if ( i >= str . length ( ) ) return - 1 ;
  return i ;
}

static int nextNonDigit ( String str , int i ) { while ( i < str . length ( ) && isDigit ( str . charAt ( i ) ) ) { i ++ ; } if ( i >= str . length ( ) ) return - 1 ; return i ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) right: (method_invocation name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) body: (block (expression_statement (update_expression (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) consequence: (return_statement (unary_expression operand: (decimal_integer_literal)))) (return_statement (identifier))))