It's designed for field/method/class/column/table names. and source and target Strings will be cached.

@param str
@return
10669
public static String toLowerCaseWithUnderscore(final String str) {
        if (N.isNullOrEmpty(str)) {
            return str;
        }

        String result = lowerCaseWithUnderscorePropNamePool.get(str);

        if (result == null) {
            result = StringUtil.toLowerCaseWithUnderscore(str);
            lowerCaseWithUnderscorePropNamePool.put(str, result);
        }

        return result;
    }
1281934
public static List<String> getFieldNames(ResultSetMetaData  resultSetMetaData) throws SQLException {
        List<String> columnNames = new ArrayList<>();
        int cols = resultSetMetaData.getColumnCount();
        for (int i = 1; i <= cols; i++) {
            columnNames.add(resultSetMetaData.getColumnName(i));
        }
        return columnNames;
    }
1241883
private static QName convertString(String str) {
        if (str != null) {
            return QName.valueOf(str);
        } else {
            return null;
        }
    }
11952
protected Content getClassName(Content classStr) {
        Content table = HtmlTree.TABLE(HtmlStyle.constantsSummary, 0, 3, 0, constantsTableSummary,
                getTableCaption(classStr));
        table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
        return table;
    }
1313918
public String toQueryString() {
		final StringBuffer buf = new StringBuffer();
		final Object value1 = this.values.get(0);
		buf.append(this.column.getName());
		switch (this.type) {
		case STARTS_WIDTH:
			buf.append(" like '" + value1 + "%'");
			break;
		case CONTAINS:
			buf.append(" like '%" + value1 + "%'");
			break;
		case ENDS_WITH:
			buf.append(" like '%" + value1 + "'");
			break;
		case DOESNOT_CONTAINS:
			buf.append(" not like '%" + value1 + "%'");
			break;
		case MORE_THAN:
			buf.append(" > '" + value1 + "'");
			break;
		case LESS_THAN:
			buf.append(" < '" + value1 + "'");
			break;
		}
		return buf.toString();
	}
370524
@Override
	public int lookupIndex(String str) {
		int ret = data.get(str);
		if (ret ==-1 && !frozen)	{
			ret = index.size();
			data.put(str, ret);
			index.put(ret, str);
		}
		return ret;
	}
1178169
private static InputSource stringToSource(String str) {
        InputSource is = new InputSource(new StringReader(str));
        is.setEncoding("UTF-8");
        return is;
    }
111925
protected String getValue(String str) {
        int index = str.indexOf('=');
        String value = null;
        if (index > 0) {
            value = str.substring(index + 1).trim();
            if (value.charAt(0) == '\"') {
                value = value.substring(1, value.length() - 1);
            }
        }
        return value;
    }
890623
public StringGrabber set(String str) {
		if (str == null)
		{
			str = "";
		}
		return set(new StringBuilder(str));
	}
1304341
public void text(String str)
    {
        if (fieldNames.isEmpty() || fieldValues.isEmpty())
            return;
        
        String val = (String)fieldValues.pop();
        val += str;
        fieldValues.push(val);
    }
1265703
@Override
	public String getString(final int columnIndex) throws SQLException {
		String columnLabel = getWrapped().getMetaData().getColumnLabel(columnIndex);

		return getString(columnLabel);
	}
287236
public static List<String> getStringList(final ResultSet rs, final String columnName) throws SQLException
    {
        final Array ary = rs.getArray(columnName);
        if (ary != null) {
            Preconditions.checkArgument(ary.getBaseType() == Types.VARCHAR || ary.getBaseType() == Types.CHAR);
            return Arrays.asList((String []) ary.getArray());
        }
        return null;
    }
171059
public static AbstractType<?> parse(String str) throws SyntaxException, ConfigurationException
    {
        if (str == null)
            return BytesType.instance;

        AbstractType<?> type = cache.get(str);

        if (type != null)
            return type;

        // This could be simplier (i.e. new TypeParser(str).parse()) but we avoid creating a TypeParser object if not really necessary.
        int i = 0;
        i = skipBlank(str, i);
        int j = i;
        while (!isEOS(str, i) && isIdentifierChar(str.charAt(i)))
            ++i;

        if (i == j)
            return BytesType.instance;

        String name = str.substring(j, i);
        i = skipBlank(str, i);

        if (!isEOS(str, i) && str.charAt(i) == '(')
            type = getAbstractType(name, new TypeParser(str, i));
        else
            type = getAbstractType(name);

        // We don't really care about concurrency here. Worst case scenario, we do some parsing unnecessarily
        cache.put(str, type);
        return type;
    }
1110524
public String[] getColumnsBySql(Sql sql) throws SQLException {
		String columns[] = null;
		
		List<Map<String, String>> table = getMetadataBySql(sql);
		if (table != null) {
			columns = new String[table.size()];
			for (int i = 0 ; i < table.size() ; i++) {
				Map<String, String> row = table.get(i);
				if (row.containsKey("NAME") && row.get("NAME") != null) {
					columns[i] = row.get("NAME");
				}
			}
		}
		
		return columns;
	}
528369
public static boolean isPrintableString(String str) {
    for (int i = 0; i < str.length(); i++) {
      if (!isPrintableChar(str.charAt(i))) {
        return false;
      }
    }
    return true;
  }
805899
function sql(str) {
    if (!(this instanceof sql))
      return applyNew(sql, arguments);

    this.str = str;
    this.vals = _.toArray(arguments).slice(1);

    // support passing a single array
    if (_.isArray(this.vals[0]))
      this.vals = this.vals[0];
  }
990958
public static String encode(String str) {
		StringBuilder sb = new StringBuilder();
		char[] arr = str.toCharArray();
		for (char c : arr) {
			String s4 = Integer.toHexString(c);
			sb.append(s4);
		}
		return sb.toString();
	}