Checks if the string builder contains the specified char.

@param ch  the character to find
@return true if the builder contains the character
491192
public boolean contains(final char ch) {
        final char[] thisBuf = buffer;
        for (int i = 0; i < this.size; i++) {
            if (thisBuf[i] == ch) {
                return true;
            }
        }
        return false;
    }
548019
@Override
    public void characters (char ch[], int start, int len) {
        while (len > 0 && Character.isWhitespace(ch[start])) {
            ++start;
            --len;
        }
        while (len > 0 && Character.isWhitespace(ch[start+len-1])) {
            --len;
        }
        if (_text.length() > 0) {
            _text.append(' ');
        }
        _text.append(ch, start, len);
    }
1057757
public final boolean contains(int c) {
        
        if(c>0x10ffff) {
            return false;
        }
            
        if(c<=0xffff) {
            int i;
            /* find c in the BMP part */
            for(i=0; i<bmpLength && (char)c>=array[i]; ++i) {}
            return ((i&1) != 0);
        } else {
            int i;
            /* find c in the supplementary part */
            char high=(char)(c>>16), low=(char)c;
            for(i=bmpLength;
                i<length && (high>array[i] || (high==array[i] && low>=array[i+1]));
                i+=2) {}
        
            /* count pairs of 16-bit units even per BMP and check if the number of pairs is odd */
            return (((i+bmpLength)&2)!=0);
        }
    }
1328525
final public void write(char ch)
  {
    Writer out = this.out;
    if (out == null)
      return;
    
    try {
      out.write(ch);
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
  }
56169
public Trie lookup(char ch) {
    int i = Arrays.binarySearch(childMap, ch);
    return i >= 0 ? children[i] : null;
  }
1075944
public boolean handleCharacter(int ch) {

		if (this.rtfParser.isImport()) {
			if (buffer.length() > 254)
				writeBuffer();
		}
		//if(data == null) data = new ByteBuffer();
		if (dataOS == null) {
			dataOS = new ByteArrayOutputStream();
		}
		switch (dataFormat) {
		case FORMAT_HEXADECIMAL:
			hexChars.append((char) ch);
			if (hexChars.length() == 2) {
				try {
					dataOS.write((char) Integer.parseInt(hexChars.toString(),
							16));
				} catch (NumberFormatException e) {
					e.printStackTrace();
				}
				hexChars = new StringBuffer();
			}
			break;
		case FORMAT_BINARY:
			if (dataOS == null) {
				dataOS = new ByteArrayOutputStream();
			}
			// HGS - FIX ME IF PROBLEM!
			dataOS.write((char) (ch));
			// PNG signature should be.
			//			   (decimal)              137  80  78  71  13  10  26  10
			//			   (hexadecimal)           89  50  4e  47  0d  0a  1a  0a
			//			   (ASCII C notation)    \211   P   N   G  \r  \n \032 \n

			binaryLength--;
			if (binaryLength == 0) {
				dataFormat = FORMAT_HEXADECIMAL;
			}
			break;
		}

		return true;
	}
1353765
@Override
    public boolean contains(int c) {
        if (c < MIN_VALUE || c > MAX_VALUE) {
            throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(c, 6));
        }
        if (bmpSet != null) {
            return bmpSet.contains(c);
        }
        if (stringSpan != null) {
            return stringSpan.contains(c);
        }

        /*
        // Set i to the index of the start item greater than ch
        // We know we will terminate without length test!
        int i = -1;
        while (true) {
            if (c < list[++i]) break;
        }
         */

        int i = findCodePoint(c);

        return ((i & 1) != 0); // return true if odd
    }
800545
static boolean containsNoDigit(final String s) {
    for (int k = 0; k < s.length(); k++) {
      if (Character.isDigit(s.charAt(k))) {
        return false;
      }
    }
    return true;
  }
1189541
@Override
    public void characters(char ch[], int start, int length) {
	content.append(new String(ch, start, length));
    }
880404
@Override
    public boolean contains(CharSequence s) {
        if (s instanceof FastStr) {
            return indexOf((FastStr) s) > -1;
        }
        return indexOf(s.toString()) > -1;
    }
1067702
private boolean isSpecial(final char chr) {
		return ((chr == '.') || (chr == '?') || (chr == '*') || (chr == '^') || (chr == '$') || (chr == '+')
				|| (chr == '[') || (chr == ']') || (chr == '(') || (chr == ')') || (chr == '|') || (chr == '\\')
				|| (chr == '&'));
	}
1233382
public static boolean isChar(char c) {
		return Character.isDigit(c)||Character.isLowerCase(c)||Character.isUpperCase(c);
	}
99469
public static boolean isAlphaNumericOrContainsOnlyCharacters(String in, String chars) {
		char c = 0;
		for (int i = 0; i < in.length(); i++) {
			c = in.charAt(i);
			if (Character.isLetterOrDigit(c) == (chars.indexOf(c) != -1)) {
				return false;
			}
		}
		return true;
	}
7849
public static boolean isBaseChar(int ch)
   {
      return (0x0041 <= ch && ch <= 0x005A) || (0x0061 <= ch && ch <= 0x007A) || (0x00C0 <= ch && ch <= 0x00D6)
         || (0x00D8 <= ch && ch <= 0x00F6) || (0x00F8 <= ch && ch <= 0x00FF) || (0x0100 <= ch && ch <= 0x0131)
         || (0x0134 <= ch && ch <= 0x013E) || (0x0141 <= ch && ch <= 0x0148) || (0x014A <= ch && ch <= 0x017E)
         || (0x0180 <= ch && ch <= 0x01C3) || (0x01CD <= ch && ch <= 0x01F0) || (0x01F4 <= ch && ch <= 0x01F5)
         || (0x01FA <= ch && ch <= 0x0217) || (0x0250 <= ch && ch <= 0x02A8) || (0x02BB <= ch && ch <= 0x02C1)
         || 0x0386 == ch || (0x0388 <= ch && ch <= 0x038A) || 0x038C == ch || (0x038E <= ch && ch <= 0x03A1)
         || (0x03A3 <= ch && ch <= 0x03CE) || (0x03D0 <= ch && ch <= 0x03D6) || 0x03DA == ch || 0x03DC == ch
         || 0x03DE == ch || 0x03E0 == ch || (0x03E2 <= ch && ch <= 0x03F3) || (0x0401 <= ch && ch <= 0x040C)
         || (0x040E <= ch && ch <= 0x044F) || (0x0451 <= ch && ch <= 0x045C) || (0x045E <= ch && ch <= 0x0481)
         || (0x0490 <= ch && ch <= 0x04C4) || (0x04C7 <= ch && ch <= 0x04C8) || (0x04CB <= ch && ch <= 0x04CC)
         || (0x04D0 <= ch && ch <= 0x04EB) || (0x04EE <= ch && ch <= 0x04F5) || (0x04F8 <= ch && ch <= 0x04F9)
         || (0x0531 <= ch && ch <= 0x0556) || 0x0559 == ch || (0x0561 <= ch && ch <= 0x0586)
         || (0x05D0 <= ch && ch <= 0x05EA) || (0x05F0 <= ch && ch <= 0x05F2) || (0x0621 <= ch && ch <= 0x063A)
         || (0x0641 <= ch && ch <= 0x064A) || (0x0671 <= ch && ch <= 0x06B7) || (0x06BA <= ch && ch <= 0x06BE)
         || (0x06C0 <= ch && ch <= 0x06CE) || (0x06D0 <= ch && ch <= 0x06D3) || 0x06D5 == ch
         || (0x06E5 <= ch && ch <= 0x06E6) || (0x0905 <= ch && ch <= 0x0939) || 0x093D == ch
         || (0x0958 <= ch && ch <= 0x0961) || (0x0985 <= ch && ch <= 0x098C) || (0x098F <= ch && ch <= 0x0990)
         || (0x0993 <= ch && ch <= 0x09A8) || (0x09AA <= ch && ch <= 0x09B0) || 0x09B2 == ch
         || (0x09B6 <= ch && ch <= 0x09B9) || (0x09DC <= ch && ch <= 0x09DD) || (0x09DF <= ch && ch <= 0x09E1)
         || (0x09F0 <= ch && ch <= 0x09F1) || (0x0A05 <= ch && ch <= 0x0A0A) || (0x0A0F <= ch && ch <= 0x0A10)
         || (0x0A13 <= ch && ch <= 0x0A28) || (0x0A2A <= ch && ch <= 0x0A30) || (0x0A32 <= ch && ch <= 0x0A33)
         || (0x0A35 <= ch && ch <= 0x0A36) || (0x0A38 <= ch && ch <= 0x0A39) || (0x0A59 <= ch && ch <= 0x0A5C)
         || 0x0A5E == ch || (0x0A72 <= ch && ch <= 0x0A74) || (0x0A85 <= ch && ch <= 0x0A8B) || 0x0A8D == ch
         || (0x0A8F <= ch && ch <= 0x0A91) || (0x0A93 <= ch && ch <= 0x0AA8) || (0x0AAA <= ch && ch <= 0x0AB0)
         || (0x0AB2 <= ch && ch <= 0x0AB3) || (0x0AB5 <= ch && ch <= 0x0AB9) || 0x0ABD == ch || 0x0AE0 == ch
         || (0x0B05 <= ch && ch <= 0x0B0C) || (0x0B0F <= ch && ch <= 0x0B10) || (0x0B13 <= ch && ch <= 0x0B28)
         || (0x0B2A <= ch && ch <= 0x0B30) || (0x0B32 <= ch && ch <= 0x0B33) || (0x0B36 <= ch && ch <= 0x0B39)
         || 0x0B3D == ch || (0x0B5C <= ch && ch <= 0x0B5D) || (0x0B5F <= ch && ch <= 0x0B61)
         || (0x0B85 <= ch && ch <= 0x0B8A) || (0x0B8E <= ch && ch <= 0x0B90) || (0x0B92 <= ch && ch <= 0x0B95)
         || (0x0B99 <= ch && ch <= 0x0B9A) || 0x0B9C == ch || (0x0B9E <= ch && ch <= 0x0B9F)
         || (0x0BA3 <= ch && ch <= 0x0BA4) || (0x0BA8 <= ch && ch <= 0x0BAA) || (0x0BAE <= ch && ch <= 0x0BB5)
         || (0x0BB7 <= ch && ch <= 0x0BB9) || (0x0C05 <= ch && ch <= 0x0C0C) || (0x0C0E <= ch && ch <= 0x0C10)
         || (0x0C12 <= ch && ch <= 0x0C28) || (0x0C2A <= ch && ch <= 0x0C33) || (0x0C35 <= ch && ch <= 0x0C39)
         || (0x0C60 <= ch && ch <= 0x0C61) || (0x0C85 <= ch && ch <= 0x0C8C) || (0x0C8E <= ch && ch <= 0x0C90)
         || (0x0C92 <= ch && ch <= 0x0CA8) || (0x0CAA <= ch && ch <= 0x0CB3) || (0x0CB5 <= ch && ch <= 0x0CB9)
         || 0x0CDE == ch || (0x0CE0 <= ch && ch <= 0x0CE1) || (0x0D05 <= ch && ch <= 0x0D0C)
         || (0x0D0E <= ch && ch <= 0x0D10) || (0x0D12 <= ch && ch <= 0x0D28) || (0x0D2A <= ch && ch <= 0x0D39)
         || (0x0D60 <= ch && ch <= 0x0D61) || (0x0E01 <= ch && ch <= 0x0E2E) || 0x0E30 == ch
         || (0x0E32 <= ch && ch <= 0x0E33) || (0x0E40 <= ch && ch <= 0x0E45) || (0x0E81 <= ch && ch <= 0x0E82)
         || 0x0E84 == ch || (0x0E87 <= ch && ch <= 0x0E88) || 0x0E8A == ch || 0x0E8D == ch
         || (0x0E94 <= ch && ch <= 0x0E97) || (0x0E99 <= ch && ch <= 0x0E9F) || (0x0EA1 <= ch && ch <= 0x0EA3)
         || 0x0EA5 == ch || 0x0EA7 == ch || (0x0EAA <= ch && ch <= 0x0EAB) || (0x0EAD <= ch && ch <= 0x0EAE)
         || 0x0EB0 == ch || (0x0EB2 <= ch && ch <= 0x0EB3) || 0x0EBD == ch || (0x0EC0 <= ch && ch <= 0x0EC4)
         || (0x0F40 <= ch && ch <= 0x0F47) || (0x0F49 <= ch && ch <= 0x0F69) || (0x10A0 <= ch && ch <= 0x10C5)
         || (0x10D0 <= ch && ch <= 0x10F6) || 0x1100 == ch || (0x1102 <= ch && ch <= 0x1103)
         || (0x1105 <= ch && ch <= 0x1107) || 0x1109 == ch || (0x110B <= ch && ch <= 0x110C)
         || (0x110E <= ch && ch <= 0x1112) || 0x113C == ch || 0x113E == ch || 0x1140 == ch || 0x114C == ch
         || 0x114E == ch || 0x1150 == ch || (0x1154 <= ch && ch <= 0x1155) || 0x1159 == ch
         || (0x115F <= ch && ch <= 0x1161) || 0x1163 == ch || 0x1165 == ch || 0x1167 == ch || 0x1169 == ch
         || (0x116D <= ch && ch <= 0x116E) || (0x1172 <= ch && ch <= 0x1173) || 0x1175 == ch || 0x119E == ch
         || 0x11A8 == ch || 0x11AB == ch || (0x11AE <= ch && ch <= 0x11AF) || (0x11B7 <= ch && ch <= 0x11B8)
         || 0x11BA == ch || (0x11BC <= ch && ch <= 0x11C2) || 0x11EB == ch || 0x11F0 == ch || 0x11F9 == ch
         || (0x1E00 <= ch && ch <= 0x1E9B) || (0x1EA0 <= ch && ch <= 0x1EF9) || (0x1F00 <= ch && ch <= 0x1F15)
         || (0x1F18 <= ch && ch <= 0x1F1D) || (0x1F20 <= ch && ch <= 0x1F45) || (0x1F48 <= ch && ch <= 0x1F4D)
         || (0x1F50 <= ch && ch <= 0x1F57) || 0x1F59 == ch || 0x1F5B == ch || 0x1F5D == ch
         || (0x1F5F <= ch && ch <= 0x1F7D) || (0x1F80 <= ch && ch <= 0x1FB4) || (0x1FB6 <= ch && ch <= 0x1FBC)
         || 0x1FBE == ch || (0x1FC2 <= ch && ch <= 0x1FC4) || (0x1FC6 <= ch && ch <= 0x1FCC)
         || (0x1FD0 <= ch && ch <= 0x1FD3) || (0x1FD6 <= ch && ch <= 0x1FDB) || (0x1FE0 <= ch && ch <= 0x1FEC)
         || (0x1FF2 <= ch && ch <= 0x1FF4) || (0x1FF6 <= ch && ch <= 0x1FFC) || 0x2126 == ch
         || (0x212A <= ch && ch <= 0x212B) || 0x212E == ch || (0x2180 <= ch && ch <= 0x2182)
         || (0x3041 <= ch && ch <= 0x3094) || (0x30A1 <= ch && ch <= 0x30FA) || (0x3105 <= ch && ch <= 0x312C)
         || (0xAC00 <= ch && ch <= 0xD7A3);
   }
20735
private boolean containsOnly(String s, char c) {
        for (char c2 : s.toCharArray()) {
            if (c != c2)
                return false;
        }

        return true;
    }
49994
public boolean handleCharacter(int ch) {
		boolean result = true;
		this.onCharacter(ch);	// event handler
		
		if(this.rtfParser.isImport()) {
			if(buffer.length() > 254) {
				this.writeBuffer();
			}
			buffer.append((char)ch);
		}
		if(this.rtfParser.isConvert()) {
			buffer.append((char)ch);
		}
		return result;
	}
1130810
public static boolean containsCharacters(String in, String chars) {
		for (int i = 0; i < chars.length(); i++) {
			if (in.indexOf(chars.charAt(i)) != -1) {
				return true;
			}
		}
		return false;
	}