Java Code Examples for org.apache.commons.text.WordUtils#uncapitalize()

The following examples show how to use org.apache.commons.text.WordUtils#uncapitalize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ServiceActions.java    From sailfish-core with Apache License 2.0 5 votes vote down vote up
public static String convertProperty(String value) {
	if (value.contains(" ")) {
		return WordUtils.uncapitalize(WordUtils.capitalizeFully(value).replaceAll(" ", ""));
	} else {
		return WordUtils.uncapitalize(value);
	}
}
 
Example 2
Source File: PTextWord.java    From jphp with Apache License 2.0 4 votes vote down vote up
@Signature
public PTextWord uncapitalize(Environment env, @Optional(type = HintType.STRING) String delimiters) {
    return new PTextWord(env, WordUtils.uncapitalize(text, delimiters.isEmpty() ? null : delimiters.toCharArray()));
}
 
Example 3
Source File: CasquatchNamingConvention.java    From casquatch with Apache License 2.0 2 votes vote down vote up
/**
 * Converts an api name to rest method
 * @param api name of api
 * @return name of rest method
 */
public static String apiToRestMethod(String api) {
    return WordUtils.uncapitalize(WordUtils.capitalizeFully(api,'/','-').replaceAll("([^a-zA-Z0-9])",""));
}
 
Example 4
Source File: CasquatchNamingConvention.java    From casquatch with Apache License 2.0 2 votes vote down vote up
/**
 * Convert class name to var
 * @param className name of class
 * @return name of var for class
 */
public static String classToVar(String className) { return WordUtils.uncapitalize(className);}
 
Example 5
Source File: CasquatchNamingConvention.java    From casquatch with Apache License 2.0 2 votes vote down vote up
/**
 * Converts a CQL column to Java Variable
 * @param cql name of cql column
 * @return java variable representation of cql
 */
public static String cqlToJavaVariable(String cql) {
    return WordUtils.uncapitalize(WordUtils.capitalize(cql,'_').replace("_",""));
}