| 438 | } |
| 439 | |
| 440 | tstring |
| 441 | DIFF_EXT::cut_to_length(const tstring& in, size_t max_len) |
| 442 | { |
| 443 | tstring ret; |
| 444 | if(in.length() > max_len) |
| 445 | { |
| 446 | ret = in.substr(0, (max_len - 3) / 2); |
| 447 | ret += TEXT("..."); |
| 448 | ret += in.substr(in.length() - (max_len - 3) / 2); |
| 449 | } |
| 450 | else |
| 451 | { |
| 452 | ret = in; |
| 453 | } |
| 454 | |
| 455 | return ret; |
| 456 | } |
nothing calls this directly
no outgoing calls
no test coverage detected