Deletes the character wherever it occurs in the builder.

@param ch  the character to delete
@return this, to enable chaining
967825
public StrBuilder deleteFirst(final char ch) {
        for (int i = 0; i < size; i++) {
            if (buffer[i] == ch) {
                deleteImpl(i, i + 1, 1);
                break;
            }
        }
        return this;
    }
329971
public int lastIndexOf(final char ch, int startIndex) {
        startIndex = (startIndex >= size ? size - 1 : startIndex);
        if (startIndex < 0) {
            return -1;
        }
        for (int i = startIndex; i >= 0; i--) {
            if (buffer[i] == ch) {
                return i;
            }
        }
        return -1;
    }
1353834
def delete_char(event):
    "  "
    deleted = event.current_buffer.delete(count=event.arg)
    if not deleted:
        event.cli.output.bell()
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;
    }
364637
public boolean isLabelAnnotationIntroducingCharacter(char ch) {
    char[] cutChars = labelAnnotationIntroducingCharacters();
    for (char cutChar : cutChars) {
      if (ch == cutChar) {
        return true;
      }
    }
    return false;
  }
1233449
public void addChar(char nextCh)
    throws IOException
  {
    int ch;
    
    while ((ch = readChar()) >= 0) {
      outputChar((char) ch);
    }

    outputChar(nextCh);
  }
268607
public static boolean isLetter(int ch)
    {
        // if props == 0, it will just fall through and return false
        return ((1 << getType(ch))
                & ((1 << UCharacterCategory.UPPERCASE_LETTER)
                        | (1 << UCharacterCategory.LOWERCASE_LETTER)
                        | (1 << UCharacterCategory.TITLECASE_LETTER)
                        | (1 << UCharacterCategory.MODIFIER_LETTER)
                        | (1 << UCharacterCategory.OTHER_LETTER))) != 0;
    }
1035747
public void write(int ch)
        throws IOException
    {
        OutputStream os = getOutputStream();

        os.write('D');
        os.write(0);
        os.write(1);
        os.write(ch);
    }
1133445
protected static final String printable(char ch) {
		StringBuffer retval = new StringBuffer();
		addPrintable(retval, ch);
		return retval.toString();
	}
377827
public static char getFirstLetter(char ch) {
		if (ch >= 'a' && ch <= 'z') {
			return ch;
		}
		if (ch >= 'A' && ch <= 'Z') {
			return Character.toLowerCase(ch);
		}
		final byte[] bys = String.valueOf(ch).getBytes(CharsetUtil.CHARSET_GBK);
		if (bys.length == 1) {
			return ch;
		}
		int count = (bys[0] + 256) * 256 + bys[1] + 256;
		if (count < 45217) {
			return ch;
		} else if (count < 45253) {
			return 'a';
		} else if (count < 45761) {
			return 'b';
		} else if (count < 46318) {
			return 'c';
		} else if (count < 46826) {
			return 'd';
		} else if (count < 47010) {
			return 'e';
		} else if (count < 47297) {
			return 'f';
		} else if (count < 47614) {
			return 'g';
		} else if (count < 48119) {
			return 'h';
		} else if (count < 49062) {
			return 'j';
		} else if (count < 49324) {
			return 'k';
		} else if (count < 49896) {
			return 'l';
		} else if (count < 50371) {
			return 'm';
		} else if (count < 50614) {
			return 'n';
		} else if (count < 50622) {
			return 'o';
		} else if (count < 50906) {
			return 'p';
		} else if (count < 51387) {
			return 'q';
		} else if (count < 51446) {
			return 'r';
		} else if (count < 52218) {
			return 's';
		} else if (count < 52698) {
			return 't';
		} else if (count < 52980) {
			return 'w';
		} else if (count < 53689) {
			return 'x';
		} else if (count < 54481) {
			return 'y';
		} else if (count < 55290) {
			return 'z';
		}
		return ch;
	}
927544
private void write(char ch, int repeat) {
        try {
            for (int i = 0; i < repeat; i++) {
                m_writer.write(ch);
            }
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        }
    }
147128
private static void appendURLEscapeEncoding(StringBuilder builder, int ch) {
        builder.append('%');
        builder.append(Character.forDigit(ch >> 4, 16));
        builder.append(Character.forDigit(ch & 0xf, 16));
    }
1192891
public void print(char ch) throws IOException
  {
    if (_startLine)
      printIndent();

    if (ch == '\r') {
      _destLine++;
    } else if (ch == '\n' && !_lastCr)
      _destLine++;

    _lastCr = ch == '\r';

    _os.print(ch);
  }
1347518
private static int selectStyle(char ch) {
        switch (ch) {
        case 'S':
            return SHORT;
        case 'M':
            return MEDIUM;
        case 'L':
            return LONG;
        case 'F':
            return FULL;
        case '-':
            return NONE;
        default:
            throw new IllegalArgumentException("Invalid style character: " + ch);
        }
    }
1344344
@Nonnull
    public BugInstance addString(char c) {
        add(StringAnnotation.fromRawString(Character.toString(c)));
        return this;
    }
1337060
public void add(char ch) {
    if (b.length <= i + EXTRA) {
      char[] new_b = new char[b.length+INC];
      for (int c = 0; c < b.length; c++)
        new_b[c] = b[c];
      b = new_b;
    }
    b[i++] = ch;
  }
1369704
public static boolean isPrintableChar(char ch) {
        if (ch >= 'a' && ch <= 'z') {
            return true;
        }
        if (ch >= 'A' && ch <= 'Z') {
            return true;
        }
        if (ch >= '0' && ch <= '9') {
            return true;
        }

        // loop thru our PRINTABLE string
        for (int i = 0; i < PRINTABLE.length(); i++) {
            if (ch == PRINTABLE.charAt(i)) {
                return true;
            }
        }

        return false;
    }