Appends a char value to the string builder.

@param ch  the value to append
@return this, to enable chaining
@since 3.0
185539
@Override
    public StrBuilder append(final char ch) {
        final int len = length();
        ensureCapacity(len + 1);
        buffer[size++] = ch;
        return this;
    }
1153489
public StrBuilder deleteAll(final char ch) {
        for (int i = 0; i < size; i++) {
            if (buffer[i] == ch) {
                final int start = i;
                while (++i < size) {
                    if (buffer[i] != ch) {
                        break;
                    }
                }
                final int len = i - start;
                deleteImpl(start, i, len);
                i -= len;
            }
        }
        return this;
    }
432503
public StrBuilder append(final char[] chars) {
        if (chars == null) {
            return appendNull();
        }
        final int strLen = chars.length;
        if (strLen > 0) {
            final int len = length();
            ensureCapacity(len + strLen);
            System.arraycopy(chars, 0, buffer, len, strLen);
            size += strLen;
        }
        return this;
    }
725464
@Nonnull
  public HashCodeGenerator append (final boolean x)
  {
    _checkClosed ();
    m_nHC = HashCodeCalculator.append (m_nHC, x);
    return this;
  }
320604
private void append(final StringBuilder builder, final String string,
            final String separator) {
        if (string != null) {
            builder.append(string);
        }
        builder.append(separator);
    }
169399
private void append(StringBuilder buffer, char c) {

		// version manually simplified
		// final boolean shouldAppend = rawOutput || escaped
		// || (c != quoteChar && c != escapeChar);
		// final boolean newEscaped = c == escapeChar && !escaped;
		// final boolean newQuoted = (c == quoteChar && !escaped) ? !quoted
		// : quoted;

		// side-effect free version directly extracted from if

		// final boolean shouldAppend = (c == escapeChar && (escaped ||
		// rawOutput))
		// || (c == quoteChar && (escaped || rawOutput))
		// || !(c == quoteChar || c == escapeChar);
		// final boolean newEscaped = c == escapeChar ? !escaped
		// : (c == quoteChar ? false : false);
		// final boolean newQuoted = c == escapeChar ? quoted
		// : (c == quoteChar ? (!escaped ? !quoted : quoted) : quoted);

		// if (shouldAppend) {
		// buffer.append(c);
		// }
		//
		// escaped = newEscaped;
		// quoted = newQuoted;

		// original version
		// XXX needed to revert to this original version as micro benchmark
		// tests
		// showed a slow down of more than 100%
		if (c == escapeChar) {
			if (escaped || rawOutput) {
				buffer.append(c);
			}
			escaped = !escaped;
		} else if (c == quoteChar) {
			if (escaped) {
				buffer.append(c);
				escaped = false;
			} else {
				quoted = !quoted;
				if (rawOutput) {
					buffer.append(c);
				}
			}
		} else {
			buffer.append(c);
			escaped = false;
		}
	}
898768
public static String getDescription(char ch)
    {
        CharInfo info = (CharInfo) fCodeMap.get(Integer.valueOf(ch));
        return (info != null) ? info.fDescription : null;
    }
1223393
public FormatStringBuffer format(char ch) {

        Format fmt = getFormat();

        if (fmt.type != CHAR) throw new IllegalArgumentException("Expected a char format");

        if ((fmt.flags & LEFT) != LEFT) while (--fmt.fieldWidth > 0)
            buffer.append(' ');
        buffer.append(ch);
        while (--fmt.fieldWidth > 0)
            buffer.append(' ');

        return this;
    }
162884
private final void _appendCharacterEscape(char ch, int escCode)
        throws IOException, JsonGenerationException
    {
        if (escCode >= 0) { // \\N (2 char)
            if ((_outputTail + 2) > _outputEnd) {
                _flushBuffer();
            }
            _outputBuffer[_outputTail++] = '\\';
            _outputBuffer[_outputTail++] = (char) escCode;
            return;
        }
        if (escCode != CharacterEscapes.ESCAPE_CUSTOM) { // std, \\uXXXX
            if ((_outputTail + 2) > _outputEnd) {
                _flushBuffer();
            }
            int ptr = _outputTail;
            char[] buf = _outputBuffer;
            buf[ptr++] = '\\';
            buf[ptr++] = 'u';
            // We know it's a control char, so only the last 2 chars are non-0
            if (ch > 0xFF) { // beyond 8 bytes
                int hi = (ch >> 8) & 0xFF;
                buf[ptr++] = HEX_CHARS[hi >> 4];
                buf[ptr++] = HEX_CHARS[hi & 0xF];
                ch &= 0xFF;
            } else {
                buf[ptr++] = '0';
                buf[ptr++] = '0';
            }
            buf[ptr++] = HEX_CHARS[ch >> 4];
            buf[ptr] = HEX_CHARS[ch & 0xF];
            _outputTail = ptr;
            return;
        }
    }
1254512
public StrBuilder appendPadding(final int length, final char padChar) {
        if (length >= 0) {
            ensureCapacity(size + length);
            for (int i = 0; i < length; i++) {
                buffer[size++] = padChar;
            }
        }
        return this;
    }
526637
public IsEmptyBuilder append(final char value) {
        if(isNotEmpty()) {
            return this;
        }

        final String str = (value == '\u0000' ? "" : String.valueOf(value));
        return append(str);
    }
1338085
public void append(final CharBuffer cb) {
        if (cb == null) {
            return;
        }
        provideCapacity(length + cb.length);
        System.arraycopy(cb.c, 0, c, length, cb.length);
        length += cb.length;
    }
430359
public static String padLeft(String str, int totalChars, char ch) {
    if (str == null) {
      str = "null";
    }
    StringBuilder sb = new StringBuilder();
    for (int i = 0, num = totalChars - str.length(); i < num; i++) {
      sb.append(ch);
    }
    sb.append(str);
    return sb.toString();
  }
903296
@Override public synchronized Long append(final String key, final String value) throws WrongTypeException {
        checkType(key, "string");
        if (!exists(key)) {
            try {
                set(key, value);
            }
            catch (Exception e) {
            }
        }
        else {
            stringCache.set(key, stringCache.get(key) + value);
        }
        return strlen(key);
    }
548164
private static void appendEncoded(StringBuilder sb, String value) {
        for (char ch : value.toCharArray()) {
            if (isUnreserved(ch)) sb.append(ch);
            else appendEscapedByte(sb, (byte) ch);
        }
    }
1101968
public Parameters append(String key, String value) {
        if (nameValuePairs == null) {
            nameValuePairs = new ArrayList<NameValuePair>();
        }
        nameValuePairs.add(new BasicNameValuePair(key, value));
        return this;
    }
1021409
public static StringBuilder appendDqValue(final StringBuilder sb, final Object value) {
        return sb.append(Chars.DQUOTE).append(value).append(Chars.DQUOTE);
    }