static boolean hasOddDollar(CharSequence text, int start, int end) {
    boolean $ = false;
    for (int i = start; i < end; i++) {
      if (text.charAt(i) == '$') {
        $ = !$;
      }
    }
    return $;
  }
static boolean hasOddDollar(CharSequence text, int start, int end)