Add space before supeflous phone number digits.

This commit is contained in:
levlam 2021-08-13 21:06:54 +03:00
parent e62655efdf
commit 957150a59c

View File

@ -240,8 +240,9 @@ void CountryInfoManager::do_get_phone_number_info(string phone_number_prefix, st
result += pattern[current_pattern_pos++];
}
if (current_pattern_pos == pattern.size()) {
result += c;
} else if (pattern[current_pattern_pos] == 'X') {
result += ' ';
}
if (current_pattern_pos >= pattern.size() || pattern[current_pattern_pos] == 'X') {
result += c;
current_pattern_pos++;
} else {