List of usage examples for org.apache.commons.lang CharUtils toString
public static String toString(Character ch)
Converts the character to a String that contains the one character.
From source file:net.ravendb.client.RavenDBAwareTests.java
protected String getDbName() { String method = testName.getMethodName(); StringBuilder dbName = new StringBuilder(); if (method.length() > 15) { dbName.append(method.substring(0, 10)); for (int i = 10; i < method.length() - 2; i++) { if (CharUtils.isAsciiAlphaUpper(method.charAt(i))) { dbName.append(method.charAt(i)); if (CharUtils.isAsciiAlphaLower(method.charAt(i + 1))) { dbName.append(method.charAt(i + 1)); }/*from ww w. j ava 2 s.c om*/ } if ('_' == method.charAt(i)) { dbName.append(CharUtils.toString(method.charAt(i + 1)).toUpperCase()); dbName.append(method.charAt(i + 2)); i++; } } } else { return method; } return dbName.toString(); }
From source file:com.adaptris.core.services.jdbc.JdbcMapInsert.java
protected String columnBookend() { return StringUtils.defaultIfEmpty(CharUtils.toString(getColumnBookendCharacter()), ""); }
From source file:org.mule.util.StringUtils.java
/** * Like {@link #repeat(String, int)} but with a single character as argument. *//*from ww w.j a va 2 s.c o m*/ public static String repeat(char c, int len) { return repeat(CharUtils.toString(c), len); }