org.springframework.data.simpledb.util.StringUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-data-simpledb Show documentation
Show all versions of spring-data-simpledb Show documentation
Provides a POJO centric model as per Spring Data interfaces to interact with Amazon SimpleDB, a non-relational datastore
package org.springframework.data.simpledb.util;
public final class StringUtil {
private StringUtil() {
// utility class
}
public static String toLowerFirstChar(String source) {
if(source == null) {
return null;
}
if(source.length() == 1) {
return source.toLowerCase();
} else {
String rest = source.substring(1);
String start = String.valueOf(source.charAt(0));
return start.toLowerCase() + rest;
}
}
public static String removeExtraSpaces(final String source) {
return source.replaceAll(" +", " ");
}
}