Examples of CharIterator


Examples of org.apache.etch.util.CharIterator

   */
  public static String subst( String value, Map<String, String> map )
  {
    StringBuffer sb = new StringBuffer();
    StringBuffer save = new StringBuffer();
    CharIterator i = new CharIterator( value );
    int state = 0;
    while (state != 4)
    {
      char c;
      int cc;
      if (i.hasNext())
      {
        c = i.next();
        cc = charClass( c );
      }
      else
      {
        c = 0;
View Full Code Here

Examples of org.apache.etch.util.CharIterator

        }
        else if (token.length() > 1)
        {
          // handle short option (e.g., -c)
         
          CharIterator i = new CharIterator( token.substring( 1 ) );
          while (i.hasNext())
          {
            String tok = String.valueOf( i.next() );
           
            Option option = findShortOption( tok );
            if (option == null)
            {
              report( String.format(
View Full Code Here

Examples of org.apache.fop.fo.CharIterator

            this.charIter = charIter;
        }

        boolean nextIsLF() {
            if (nextIsEOL == false) {
                CharIterator lfIter = charIter.mark();
                while (lfIter.hasNext()) {
                    int charClass = CharUtilities.classOf(lfIter.nextChar());
                    if (charClass == CharUtilities.LINEFEED) {
                        nextIsEOL = true;
                        return nextIsEOL;
                    } else if (charClass != CharUtilities.XMLWHITESPACE) {
                        return nextIsEOL;
View Full Code Here

Examples of org.eobjects.analyzer.util.CharIterator

  public static String safeName(String str) {
    if (StringUtils.isNullOrEmpty(str)) {
      throw new IllegalArgumentException("Cannot create safe name from empty/null string: " + str);
    }

    CharIterator ci = new CharIterator(str);
    while (ci.hasNext()) {
      ci.next();
      if (!ci.isLetter() && !ci.isDigit()) {
        // replaces unexpected chars with underscore
        ci.set('_');
      }
    }

    str = ci.toString();
    if (!Character.isLetter(str.charAt(0))) {
      str = "db" + str;
    }
    return str;
  }
View Full Code Here

Examples of org.eobjects.analyzer.util.CharIterator

  private static final long serialVersionUID = 1L;

  @Override
  public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
    boolean number = true;
    CharIterator it = new CharIterator(str);
    while (it.hasNext() && number) {
      it.next();
      if (!it.isDigit()) {
        if (!it.is('-')) {
          if (!it.is('.')) {
            if (!it.is('%')) {
              number = false;
            }
          }
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.