src/org/nutz/dao/impl/sql/ValueEscaper.java
public CharSequence escape(CharSequence cs) {
        StringBuilder sb = new StringBuilder();
        boolean find;
        for (int i = 0; i < cs.length(); i++) {
            char c = cs.charAt(i);
            find = false;
            for (int x = 0; x < chars.length; x++) {
                if (c == chars[x]) {
                    sb.append(escapes[x]);
                    find = true;
                    break;
                }
            }
            if (!find)
                sb.append(c);
        }
        return sb;
    }
public CharSequence escape(CharSequence cs) {
        StringBuilder sb = new StringBuilder();
        boolean find;
        for (int i = 0; i < cs.length(); i++) {
            char c = cs.charAt(i);
            find = false;
            for (int x = 0; x < chars.length; x++) {
                if (c == chars[x]) {
                    sb.append(escapes[x]);
                    find = true;
                    break;
                }
            }
            if (!find)
                sb.append(c);
        }
        return sb;
    }
public CharSequence escape ( CharSequence cs ) { StringBuilder sb = new StringBuilder ( ) ; boolean find ; for ( int i = 0 ; i < cs . length ( ) ; i ++ ) { char c = cs . charAt ( i ) ; find = false ; for ( int x = 0 ; x < chars . length ; x ++ ) { if ( c == chars [ x ] ) { sb . append ( escapes [ x ] ) ; find = true ; break ; } } if ( ! find ) sb . append ( c ) ; } return sb ; }
根据逃逸的设置，对传入的字符串进行逃逸

@param cs
字符序列
@return 逃逸后的字符序列
根据逃逸的设置，对传入的字符串进行逃逸