Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

'Strikethrough', 'Blockquote', 'Inline Code', 'Fenced Code Block', 'Header', 'Unordered List', 'Ordered List' and 'Horizontal Rule' actions added

AuthorKarl Tauber <email>
Date2015-07-31 10:19:09 GMT+0200
Commitc90cd875255334b0c19a6d37dd7513df7fa739fd
Parent6d015d3
Delta14 lines added, 0 lines removed, 14-line increase
src/main/java/org/markdownwriterfx/util/Utils.java
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>();