Changeset 19259 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2024-11-15T17:20:57+01:00 (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java
r19092 r19259 1035 1035 * @param s The base string 1036 1036 * @param begin The start index 1037 * @param end The end index 1037 * @param end The end index. If negative, it counts from the end of the string 1038 1038 * @return the substring 1039 1039 * @see String#substring(int, int) 1040 1040 */ 1041 1041 public static String substring(String s, float begin, float end) { 1042 return s == null ? null : s.substring((int) begin, (int) end);1042 return s == null ? null : s.substring((int) begin, (int) (end >= 0 ? end : s.length() + end)); 1043 1043 } 1044 1044
Note:
See TracChangeset
for help on using the changeset viewer.