Ignore:
Timestamp:
2020-01-10T00:07:20+01:00 (5 years ago)
Author:
simon04
Message:

Refactoring: OsmUtils.splitMultipleValues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java

    r14486 r15671  
    88import java.util.Map;
    99import java.util.Set;
     10import java.util.regex.Pattern;
     11import java.util.stream.Stream;
    1012
    1113import org.openstreetmap.josm.data.coor.LatLon;
     
    207209        return ds == null || !ds.isLocked();
    208210    }
     211
     212    /**
     213     * Splits a tag value by <a href="https://wiki.openstreetmap.org/wiki/Semi-colon_value_separator">semi-colon value separator</a>.
     214     * Spaces around the ; are ignored.
     215     *
     216     * @param value the value to separate
     217     * @return the separated values as Stream
     218     * @since xxx
     219     */
     220    public static Stream<String> splitMultipleValues(String value) {
     221        return Pattern.compile("\\s*;\\s*").splitAsStream(value);
     222    }
    209223}
Note: See TracChangeset for help on using the changeset viewer.