<b>注意：</b> 该String值不能为null且不会进行转义， 只用于不含需要转义字符的字符串，例如enum、double、BigInteger转换的String

@param quote 是否加双引号
@param value 非null且不含需要转义的字符的String值
480784
public void writeTo(final boolean quote, final String value) {
        int len = value.length();
        expand(len + (quote ? 2 : 0));
        if (quote) content[count++] = '"';
        value.getChars(0, len, content, count);
        count += len;
        if (quote) content[count++] = '"';
    }
540541
public static CharSequence toParameterValue(final JavaScriptInlineFunction value) {
        return value != null ? value.build() : Attr.nullValue();
    }
1144461
static String unescapeCommandAttributeValue(String s, QuoteStyle quoteStyle) {
    // NOTE: we don't just use String.replace since it internally allocates/compiles a regular
    // expression.  Instead we have a handrolled loop.
    int index = s.indexOf(quoteStyle == QuoteStyle.DOUBLE ? "\\\"" : "\\\'");
    if (index == -1) {
      return s;
    }
    StringBuilder buf = new StringBuilder(s.length());
    buf.append(s);
    boolean nextIsQ = buf.charAt(s.length() - 1) == quoteStyle.getQuoteChar();
    for (int i = s.length() - 2; i >= index; i--) {
      char c = buf.charAt(i);
      if (c == '\\' && nextIsQ) {
        buf.deleteCharAt(i);
      }
      nextIsQ = c == quoteStyle.getQuoteChar();
    }
    return buf.toString();
  }
463854
private void value(final String val,
                     final String quoteChar) throws IOException {
    if (val == null) {
      return;
    }

    String q = quoteChar;
    if (q == null) {
      q = "";
    }

    if ((val.indexOf('&') >= 0) ||
        (val.indexOf('<') >= 0)) {
      out("<![CDATA[");
      out(q);
      out(val);
      out(q);
      out("]]>");
    } else {
      out(q);
      out(val);
      out(q);
    }
  }
770905
@Override
	protected R parseValueFromString(String value)
	{


        value = value.replaceAll("-", "_");
        value = value.replaceAll("^\\s+","");
        value = value.replaceAll("\\s+$","");
		return (R)Enum.valueOf(this.getRange(), value);
	}
743231
protected void addArg(Object value) {
        if (value instanceof Enum) {
            value = ((Enum<?>) value).name();
        }
        args.add(value);
    }
904627
static String stringLiteralWithDoubleQuotes(String value, String indent) {
    StringBuilder result = new StringBuilder(value.length() + 2);
    result.append('"');
    for (int i = 0; i < value.length(); i++) {
      char c = value.charAt(i);
      // trivial case: single quote must not be escaped
      if (c == '\'') {
        result.append("'");
        continue;
      }
      // trivial case: double quotes must be escaped
      if (c == '\"') {
        result.append("\\\"");
        continue;
      }
      // default case: just let character literal do its work
      result.append(characterLiteralWithoutSingleQuotes(c));
      // need to append indent after linefeed?
      if (c == '\n' && i + 1 < value.length()) {
        result.append("\"\n").append(indent).append(indent).append("+ \"");
      }
    }
    result.append('"');
    return result.toString();
  }
904436
function quoteLiteral(value) {

    var literal = null;
    var explicitCast = null;

    if (value === undefined || value === null) {
        return 'NULL';
    } else if (value === false) {
        return "'f'";
    } else if (value === true) {
        return "'t'";
    } else if (value instanceof Date) {
        return "'" + formatDate(value.toISOString()) + "'";
    } else if (value instanceof Buffer) {
        return "E'\\\\x" + value.toString('hex') + "'";
    } else if (Array.isArray(value) === true) {
        var temp = [];
        for (var i = 0; i < value.length; i++) {
            if (Array.isArray(value[i]) === true) {
                temp.push(arrayToList(i !== 0, value[i], quoteLiteral))
            } else {
                temp.push(quoteLiteral(value[i]));
            }
        }
        return temp.toString();
    } else if (value === Object(value)) {
        explicitCast = 'jsonb';
        literal = JSON.stringify(value);
    } else {
        literal = value.toString().slice(0); // create copy
    }

    var hasBackslash = false;
    var quoted = '\'';

    for (var i = 0; i < literal.length; i++) {
        var c = literal[i];
        if (c === '\'') {
            quoted += c + c;
        } else if (c === '\\') {
            quoted += c + c;
            hasBackslash = true;
        } else {
            quoted += c;
        }
    }

    quoted += '\'';

    if (hasBackslash === true) {
        quoted = 'E' + quoted;
    }

    if (explicitCast) {
        quoted += '::' + explicitCast;
    }

    return quoted;
}
1111865
public static String nullIfEmpty(String value) {
		return value==null || value.isEmpty() ? null : value;
	}
178171
public void setValue(StringValue value, int offset, int len) {
		checkNotNull(value);
		setValue(value.value, offset, len);
	}
980144
private static StringBuilder simpleQuote(final StringBuilder sb, final String value) {
		for (int i = 0; i < value.length(); ++i) {
			final char c = value.charAt(i);
			switch (c) {
				case '\\':
				case '^':
				case '$':
				case '.':
				case '|':
				case '?':
				case '*':
				case '+':
				case '(':
				case ')':
				case '[':
				case '{':
					sb.append('\\');
				default:
					sb.append(c);
			}
		}
		return sb;
	}
1129860
@SuppressWarnings("fallthrough")
  private String nextUnquotedValue() throws IOException {
    StringBuilder builder = null;
    int i = 0;

    findNonLiteralCharacter:
    while (true) {
      for (; pos + i < limit; i++) {
        switch (buffer[pos + i]) {
        case '/':
        case '\\':
        case ';':
        case '#':
        case '=':
          checkLenient(); // fall-through
        case '{':
        case '}':
        case '[':
        case ']':
        case ':':
        case ',':
        case ' ':
        case '\t':
        case '\f':
        case '\r':
        case '\n':
          break findNonLiteralCharacter;
        }
      }

      // Attempt to load the entire literal into the buffer at once.
      if (i < buffer.length) {
        if (fillBuffer(i + 1)) {
          continue;
        } else {
          break;
        }
      }

      // use a StringBuilder when the value is too long. This is too long to be a number!
      if (builder == null) {
        builder = new StringBuilder();
      }
      builder.append(buffer, pos, i);
      pos += i;
      i = 0;
      if (!fillBuffer(1)) {
        break;
      }
    }

    String result;
    if (builder == null) {
      result = new String(buffer, pos, i);
    } else {
      builder.append(buffer, pos, i);
      result = builder.toString();
    }
    pos += i;
    return result;
  }
186314
private static Number getNumberValue(String value, String numFmtString) {
		if(StrUtil.isBlank(value)) {
			return null;
		}
		double numValue = Double.parseDouble(value);
		// 普通数字
		if (null != numFmtString && numFmtString.indexOf(StrUtil.C_DOT) < 0) {
			final long longPart = (long) numValue;
			if (longPart == numValue) {
				// 对于无小数部分的数字类型，转为Long
				return longPart;
			}
		}
		return numValue;
	}
209413
private void appendField(final String value) throws IOException {
		boolean alwaysDelimitText = config.alwaysDelimitText;
		char textDelimiter = config.textDelimiter;
		char fieldSeparator = config.fieldSeparator;

		if (false == newline) {
			writer.write(fieldSeparator);
		} else {
			newline = false;
		}

		if (null == value) {
			if (alwaysDelimitText) {
				writer.write(new char[] { textDelimiter, textDelimiter });
			}
			return;
		}

		final char[] valueChars = value.toCharArray();
		boolean needsTextDelimiter = alwaysDelimitText;
		boolean containsTextDelimiter = false;

		for (final char c : valueChars) {
			if (c == textDelimiter) {
				// 字段值中存在包装符
				containsTextDelimiter = needsTextDelimiter = true;
				break;
			} else if (c == fieldSeparator || c == CharUtil.LF || c == CharUtil.CR) {
				// 包含分隔符或换行符需要包装符包装
				needsTextDelimiter = true;
			}
		}

		// 包装符开始
		if (needsTextDelimiter) {
			writer.write(textDelimiter);
		}

		// 正文
		if (containsTextDelimiter) {
			for (final char c : valueChars) {
				// 转义文本包装符
				if (c == textDelimiter) {
					writer.write(textDelimiter);
				}
				writer.write(c);
			}
		} else {
			writer.write(valueChars);
		}

		// 包装符结尾
		if (needsTextDelimiter) {
			writer.write(textDelimiter);
		}
	}
74819
private void initSyntaxRule() throws SQLException {
    // Deduce the string used to quote identifiers. For example, Oracle
    // uses double-quotes:
    //   SELECT * FROM "My Schema"."My Table"
    String identifierQuoteString = meta.getIdentifierQuoteString();
    if (identifierQuoteString.length() > 1) {
      sqlLine.error("Identifier quote string is '" + identifierQuoteString
          + "'; quote strings longer than 1 char are not supported");
      identifierQuoteString = null;
    }
    final String productName = meta.getDatabaseProductName();
    final Set<String> keywords =
        Stream.of(meta.getSQLKeywords().split(","))
            .collect(Collectors.toSet());
    dialect = DialectImpl.create(keywords, identifierQuoteString,
        productName, meta.storesUpperCaseIdentifiers());
  }
972396
static String escapeControlSymbols(String value) {
    if (value == null || value.isEmpty()) {
      return value;
    }
    StringBuilder result = null;
    for (int i = 0; i < value.length(); i++) {
      char ch = value.charAt(i);
      if (Character.getType(ch) == Character.CONTROL) {
        if (result == null) {
          result = new StringBuilder();
          if (i != 0) {
            result.append(value, 0, i);
          }
        }
        result.append(ESCAPING_MAP.get(ch));
      } else if (result != null) {
        result.append(ch);
      }
    }
    return result == null ? value : result.toString();
  }
957934
def quote(cls, value):
        
        if cls.serialization_method is not None:
            value = cls.serialization_method.dumps(value)
        if cls.quote_base64:
            value = b''.join(base64.b64encode(value).splitlines()).strip()
        return value