Changeset 6742 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2014-01-19T20:59:05+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6740 r6742 947 947 return biggerCopy; 948 948 } 949 950 /** 951 * If the string {@code s} is longer than {@code maxLength}, the string is cut and "..." is appended. 952 */ 953 public static String shortenString(String s, int maxLength) { 954 if (s != null && s.length() > maxLength) { 955 return s.substring(0, maxLength - 3) + "..."; 956 } else { 957 return s; 958 } 959 } 949 960 }
Note: See TracChangeset
for help on using the changeset viewer.