Changeset 14438 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2018-11-20T21:18:32+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
r14143 r14438 127 127 } 128 128 129 private static String simplifyString(String s) { 130 return Utils.deAccent(s).toLowerCase(Locale.ENGLISH).replaceAll("\\p{Punct}", ""); 131 } 132 129 133 private static int isMatching(Collection<String> values, String... searchString) { 130 134 int sum = 0; 131 List<String> deaccentedValues = values.stream() .map(132 s -> Utils.deAccent(s).toLowerCase(Locale.ENGLISH)).collect(Collectors.toList());135 List<String> deaccentedValues = values.stream() 136 .map(PresetClassification::simplifyString).collect(Collectors.toList()); 133 137 for (String word: searchString) { 134 138 boolean found = false; 135 139 boolean foundFirst = false; 136 String deaccentedWord = Utils.deAccent(word);140 String deaccentedWord = simplifyString(word); 137 141 for (String value: deaccentedValues) { 138 142 int index = value.indexOf(deaccentedWord);
Note:
See TracChangeset
for help on using the changeset viewer.