|
|
%!s(int64=2) %!d(string=hai) anos | |
|---|---|---|
| include | %!s(int64=2) %!d(string=hai) anos | |
| src | %!s(int64=2) %!d(string=hai) anos | |
| string-utils.xcodeproj | %!s(int64=2) %!d(string=hai) anos | |
| string_utils-test | %!s(int64=5) %!d(string=hai) anos | |
| test | %!s(int64=2) %!d(string=hai) anos | |
| .clang-format | %!s(int64=4) %!d(string=hai) anos | |
| README.md | %!s(int64=2) %!d(string=hai) anos |
A couple of utilities for improving string usability
Concatenate the elements of a container with a joining token. Uses ostreams.
Split a string into a vector of strings. There are two different versions of the tokenizer: normal and escapable. The EscapableTokenizer cannot return string_views, because it may have to doctor the contents.
In GoogleMock, if you don't want to define an ostream operator for your type, you can define a
function PrintTo(T const &, std::ostream*) in the same namespace as T. GoogleMock then uses ADL
to find that function and use it to print out the formatted version.