| Author | Karl Tauber <email> |
|---|---|
| Date | 2015-07-31 10:19:09 GMT+0200 |
| Commit | c90cd875255334b0c19a6d37dd7513df7fa739fd |
| Parent | 6d015d3 |
| Delta | 14 lines added, 0 lines removed, 14-line increase |
| public class Utils | ||
| { | ||
| + public static String ltrim(String s) { | ||
| + int i = 0; | ||
| + while (i < s.length() && Character.isWhitespace(s.charAt(i))) | ||
| + i++; | ||
| + return s.substring(i); | ||
| + } | ||
| + | ||
| + public static String rtrim(String s) { | ||
| + int i = s.length() - 1; | ||
| + while (i >= 0 && Character.isWhitespace(s.charAt(i))) | ||
| + i--; | ||
| + return s.substring(0, i + 1); | ||
| + } | ||
| + | ||
| public static String[] getPrefsStrings(Preferences prefs, String key) { | ||
| ArrayList<String> arr = new ArrayList<String>(); |