Ignore:
Timestamp:
2019-12-13T23:04:23+01:00 (4 years ago)
Author:
Don-vip
Message:

fix #18408 - Add trim_list mapCSS function (patch by taylor.smock)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java

    r15323 r15591  
    983983
    984984    /**
     985     * Trim whitespaces from the strings {@code strings}.
     986     *
     987     * @param strings The list of strings to strip
     988     * @return The resulting string
     989     * @see Utils#strip
     990     * @since 15591
     991     */
     992    public static List<String> trim_list(List<String> strings) {
     993        return strings.stream().map(Utils::strip).filter(str -> !str.isEmpty()).collect(Collectors.toList());
     994    }
     995
     996    /**
    985997     * Check if two strings are similar, but not identical, i.e., have a Levenshtein distance of 1 or 2.
    986998     * @param string1 first string to compare
Note: See TracChangeset for help on using the changeset viewer.