code: private String nonControl(String s,int start) {
      String ret="";
      cPos=s.indexOf("%",start);
      if (cPos==-1) cPos=s.length();
      return s.substring(start,cPos);
    }
docs: Return a substring starting at
  <code>start</code> and ending at either the end
  of the String <code>s</code>, the next unpaired
  percent sign, or at the end of the String if the
  last character is a percent sign.
  @param s  Control string.
  @param start Position in the string
  <code>s</code> to begin looking for the start
  of a control string.
  @return the substring from the start position
  to the beginning of the control string.