Java Utililty Methods String to DBC

List of utility methods to do String to DBC

Description

The list of methods to do String to DBC are organized into topic(s).

Method

StringToDBC(String input)
To DBC
char[] c = input.toCharArray();
for (int i = 0; i < c.length; i++) {
    if (c[i] == 12288) {
        c[i] = (char) 32;
        continue;
    if (c[i] > 65280 && c[i] < 65375)
        c[i] = (char) (c[i] - 65248);
...
StringtoDBC(String input)
to DBC
if (input == null || input.isEmpty()) {
    return input;
final char arr[] = input.toCharArray();
final int len = arr.length;
boolean changed = false;
for (int i = 0; i < len; i++) {
    final char c = arr[i];
...
StringtoDBC(String s)
to DBC
if (isEmpty(s)) {
    return s;
char[] chars = s.toCharArray();
for (int i = 0, len = chars.length; i < len; i++) {
    if (chars[i] == 12288) {
        chars[i] = ' ';
    } else if (65281 <= chars[i] && chars[i] <= 65374) {
...