|
|
|
@ -222,7 +222,7 @@ std::string Shorten(const std::basic_string<my_char_t> &s, size_t max_length) |
|
|
|
return TO_STRING(s); |
|
|
|
return TO_STRING(s); |
|
|
|
if (max_length < 2) |
|
|
|
if (max_length < 2) |
|
|
|
return ""; |
|
|
|
return ""; |
|
|
|
std::basic_string<my_char_t> result(s, 0, max_length/2-1); |
|
|
|
std::basic_string<my_char_t> result(s, 0, max_length/2-!(max_length%2)); |
|
|
|
result += U(".."); |
|
|
|
result += U(".."); |
|
|
|
result += s.substr(s.length()-max_length/2+1); |
|
|
|
result += s.substr(s.length()-max_length/2+1); |
|
|
|
return TO_STRING(result); |
|
|
|
return TO_STRING(result); |
|
|
|
|