判断字符是否为汉字，数字和字母， 因为对符号进行相似度比较没有实际意义，故符号不加入考虑范围。

@param charValue 字符
@return 是否为汉字，数字和字母
199397
private static boolean charReg(char charValue) {
		return (charValue >= 0x4E00 && charValue <= 0XFFF) || //
				(charValue >= 'a' && charValue <= 'z') || //
				(charValue >= 'A' && charValue <= 'Z') || //
				(charValue >= '0' && charValue <= '9');
	}
380077
public java.lang.String getValue() {
    java.lang.Object ref = value_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        value_ = s;
      }
      return s;
    }
  }
29082
public static char pickChar(String values) {
		if (values == null || values.length() == 0)
			return '\0';

		int index = RandomInteger.nextInteger(values.length());
		return values.charAt(index);
	}
507426
public static CharPredicate among(final String chars) {
    return new CharPredicate() {
      @Override public boolean isChar(char c) {
        return chars.indexOf(c) >= 0;
      }
      @Override public String toString() {
        return '[' + chars + ']';
      }
    };
  }
354758
private Charset getCharset(final String value) {
        Charset c = null;
        if (value != null) {
            final String[] tokens = value.trim().split("[;=]");
            if (tokens.length >= 3 && tokens[1].trim().equals("charset")) {
                try {
                    c = Charset.forName(tokens[2].trim());
                } catch (final RuntimeException e) {
                    logger.error(MessageUtils.getMessage("DOTJ052E", tokens[2].trim()).toString());
                }
            }
        }
        if (c == null) {
            final String defaultCharset = Configuration.configuration.get("default.coderef-charset");
            if (defaultCharset != null) {
                c = Charset.forName(defaultCharset);
            } else {
                c = Charset.defaultCharset();
            }
        }
        return c;
    }
238414
public static Charset getCharset(CharSequence contentTypeValue) {
        if (contentTypeValue != null) {
            return getCharset(contentTypeValue, CharsetUtil.ISO_8859_1);
        } else {
            return CharsetUtil.ISO_8859_1;
        }
    }
1269415
public byte[] toByte(Object bean, Charset charset)
            throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
        Object value = this.getFieldValue(bean);
        if (isDynamicField()) {
            return getDynamicFieldByteValue(value, charset);
        } else if (String.class.equals(field.getType())) {
            // 如果是动态属性
            return BytesUtil.objString2Byte((String) value, max, charset);
        } else if (long.class.equals(field.getType())) {
            return BytesUtil.long2buff((long) value);
        } else if (int.class.equals(field.getType())) {
            return BytesUtil.long2buff((int) value);
        } else if (Date.class.equals(field.getType())) {
            throw new FdfsColumnMapException("Date 还不支持");
        } else if (byte.class.equals(field.getType())) {
            byte[] result = new byte[1];
            result[0] = (byte) value;
            return result;
        } else if (boolean.class.equals(field.getType())) {
            throw new FdfsColumnMapException("boolean 还不支持");
        }
        throw new FdfsColumnMapException("将属性值转换为byte时未识别的FdfsColumn类型" + field.getName());
    }
1343348
protected static String valueString(Object value) {
        if (value == null) {
            return "null";
        } else if (value instanceof String) {
            return "\"" + ((String) value).codePoints()
                    .flatMap(cp ->
                        (cp == '"')
                            ? "\\\"".codePoints()
                            : (cp < 256)
                                ? charRep[cp].codePoints()
                                : IntStream.of(cp))
                    .collect(
                            StringBuilder::new,
                            StringBuilder::appendCodePoint,
                            StringBuilder::append)
                    .toString() + "\"";
        } else if (value instanceof Character) {
            char cp = (char) (Character) value;
            return "'" + (
                (cp == '\'')
                    ? "\\\'"
                    : (cp < 256)
                            ? charRep[cp]
                            : String.valueOf(cp)) + "'";
        } else if (value.getClass().isArray()) {
            int dims = 0;
            Class<?> t = value.getClass();
            while (true) {
                Class<?> ct = t.getComponentType();
                if (ct == null) {
                    break;
                }
                ++dims;
                t = ct;
            }
            String tn = t.getTypeName();
            int len = Array.getLength(value);
            StringBuilder sb = new StringBuilder();
            sb.append(tn.substring(tn.lastIndexOf('.') + 1, tn.length()));
            sb.append("[");
            sb.append(len);
            sb.append("]");
            for (int i = 1; i < dims; ++i) {
                sb.append("[]");
            }
            sb.append(" { ");
            for (int i = 0; i < len; ++i) {
                sb.append(valueString(Array.get(value, i)));
                if (i < len - 1) {
                    sb.append(", ");
                }
            }
            sb.append(" }");
            return sb.toString();
        } else {
            return value.toString();
        }
    }
649204
public List<String> getValuesAsString() {
        List<CharSequence> valuesAsCharSequence = getValues();
        List<String> res = new ArrayList<>(valuesAsCharSequence.size());
        for (CharSequence value : valuesAsCharSequence) {
            res.add(value.toString());
        }
        return res;
    }
877629
public static <T extends CharSequence> T validateChinese(T value, String errorMsg) throws ValidateException {
		if (false == isChinese(value)) {
			throw new ValidateException(errorMsg);
		}
		return value;
	}
945149
private List<Character> asCharList(Object value) {
        char[] values = (char[]) value;
        List<Character> list = new ArrayList<Character>(values.length);
        for (char charValue : values) {
            list.add(charValue);
        }
        return list;
    }
1191488
public static String longToString(long longValue, boolean noCase) {
        char[] digits = noCase ? DIGITS_NOCASE : DIGITS;
        int digitsLength = digits.length;

        if (longValue == 0) {
            return String.valueOf(digits[0]);
        }

        if (longValue < 0) {
            longValue = -longValue;
        }

        StringBuilder strValue = new StringBuilder();

        while (longValue != 0) {
            int digit = (int) (longValue % digitsLength);
            longValue = longValue / digitsLength;

            strValue.append(digits[digit]);
        }

        return strValue.toString();
    }
828721
public static char[] unWrap(Character... values) {
		if (null == values) {
			return null;
		}
		final int length = values.length;
		if (0 == length) {
			return new char[0];
		}

		char[] array = new char[length];
		for (int i = 0; i < length; i++) {
			array[i] = values[i].charValue();
		}
		return array;
	}
1199450
private static String filterValue(String value) 
            throws IOException {
        InternalStringBuilder result = new InternalStringBuilder(value.length());
        
        for (int i = 0; i < value.length(); ++i) {
            char c = value.charAt(i);
            switch (c) {
                case '<':
                    result.append("&lt;");
                    break;
                case '>':
                    result.append("&gt;");
                    break;
                case '&':
                    result.append("&amp;");
                    break;
                default:
                    result.append(c);
            }
        }
        
        return result.toString();
    }
44897
public static String writeCharacter(Character value) {
		if (value==null) return null;
		
		return Integer.toString((int)value);			
	}
245149
public void writeChar(char value) throws UnsupportedEncodingException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeChar", Character.valueOf(value));
    getBodyList().add(Character.valueOf(value));
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "writeChar");
  }
436655
public static StringBuilder encode(StringBuilder buffer, CharSequence chars) {
		chars.chars().forEach(c -> {
			if (c == '\\') {
				buffer.append("\\\\");
			} else if (c == '"') {
				buffer.append("\\\"");
			} else if (32 <= c && c <= 126) {
				buffer.append((char) c);
			} else {
				switch (c) {
				case 0:
					buffer.append("\\0");
					break;
				case 8:
					buffer.append("\\b");
					break;
				case 9:
					buffer.append("\\t");
					break;
				case 10:
					buffer.append("\\n");
					break;
				case 12:
					buffer.append("\\f");
					break;
				case 13:
					buffer.append("\\r");
					break;
				default:
					buffer.append("\\u").append(hexCharsUpper[(c >> 12) & 0xf]).append(hexCharsUpper[(c >> 8) & 0xf])
							.append(hexCharsUpper[(c >> 4) & 0xf]).append(hexCharsUpper[c & 0xf]);
				}
			}
		});
		return buffer;
	}