Changeset 6699 in josm for trunk/src/org/openstreetmap/josm/data/osm
- Timestamp:
- 2014-01-16T02:42:49+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Tag.java
r6513 r6699 3 3 4 4 import org.openstreetmap.josm.tools.CheckParameterUtil; 5 import org.openstreetmap.josm.tools.Utils; 5 6 6 7 /** … … 17 18 * Create an empty tag whose key and value are empty. 18 19 */ 19 public Tag() {20 public Tag() { 20 21 this("", ""); 21 22 } … … 119 120 return key + "=" + value; 120 121 } 122 123 /** 124 * Removes leading, trailing, and multiple inner whitespaces from the given string, to be used as a key or value. 125 * @param s The string 126 * @return The string without leading, trailing or multiple inner whitespaces 127 * @since 6699 128 */ 129 public static String removeWhiteSpaces(String s) { 130 if (s == null || s.isEmpty()) { 131 return s; 132 } 133 return Utils.strip(s).replaceAll("\\s+", " "); 134 } 121 135 }
Note:
See TracChangeset
for help on using the changeset viewer.