[core] Use hyphens instead of colons for address ranges

Signed-off-by: zyphlar <zyphlar@gmail.com>
This commit is contained in:
zyphlar
2025-07-15 23:18:18 -07:00
committed by Konstantin Pastbin
parent 24a4edd904
commit 57e86d72e9
4 changed files with 18 additions and 3 deletions

View File

@@ -375,6 +375,17 @@ void GetReadableName(NameParamsIn const & in, NameParamsOut & out)
GetReadableNameImpl(in, in.IsNativeOrSimilarLang(), out);
}
string const GetReadableAddress(string const & address) {
// Instead of housenumber range strings like 123:456, hyphenate like 123 - 456
string out = address;
size_t pos = 0;
while ((pos = out.find(":", pos)) != string::npos) {
out.replace(pos, 1, "\u2009\u2013\u2009"); // thin space + en-dash + thin space
break;
}
return out;
}
/*
int8_t GetNameForSearchOnBooking(RegionData const & regionData, StringUtf8Multilang const & src, string & name)
{