Changeset 7620
- Timestamp:
- 2004-06-18T14:13:28+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r7574 r7620 897 897 * @deprecated This function makes a mess of Unicode strings. 898 898 */ 899 static public String stripNL(String raw_str) {899 static public String oldStripNL(String raw_str) { 900 900 byte raw[] = raw_str.getBytes(); 901 901 byte formatted[] = new byte[raw.length]; … … 924 924 925 925 926 /** I hope this works a bit better on Unicode strings, but I haven't tested it yet! */ 927 static public String stripNL(String raw_string) 928 { 929 String stripped_string = new String(); 930 for (int i = 0; i < raw_string.length(); i++) { 931 char raw_character = raw_string.charAt(i); 932 if (raw_character != '\n' && raw_character != '\t') { 933 stripped_string = stripped_string + raw_character; 934 } 935 } 936 return stripped_string; 937 } 938 939 926 940 static public String trimCenter(String text, int length) { 927 941 if(text.length() > length) {
Note:
See TracChangeset
for help on using the changeset viewer.