Added a string sort to StringUtils.
*/
package org.linqs.psl.util;
+import java.util.Arrays;
import java.util.List;
/**
@@ -198,4 +199,10 @@ public final class StringUtils {
return builder.toString();
}
+
+ public static String sort(String string) {
+ char[] chars = string.toCharArray();
+ Arrays.sort(chars);
+ return new String(chars);
+ }
}
