Changeset 4271


Ignore:
Timestamp:
2003-05-13T10:18:35+12:00 (21 years ago)
Author:
kjdon
Message:

new method to tidy up whitespace in a string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java

    r4244 r4271  
    3737    return ""; // index out of bounds
    3838    }
     39
     40   
     41    public static String tidyWhitespace(String original) {
     42   
     43    if (original==null || original.equals("")) {
     44        return original;
     45    }
     46    String new_s = original.replaceAll("\\s+", " ");
     47    return new_s;
     48    }
    3949}
Note: See TracChangeset for help on using the changeset viewer.