Builds a `len`-byte string with `match` once every `stride` bytes.
| 69 | |
| 70 | // Builds a `len`-byte string with `match` once every `stride` bytes. |
| 71 | std::string MakeText(int64_t len, int stride, char match, char filler) { |
| 72 | std::string s(static_cast<size_t>(len), filler); |
| 73 | for (int64_t i = 0; i < len; i += stride) { |
| 74 | s[static_cast<size_t>(i)] = match; |
| 75 | } |
| 76 | return s; |
| 77 | } |
| 78 | |
| 79 | // Exact output size, so the "old" arm gets a buffer large enough to complete. |
| 80 | int32_t ExactCapacity(const std::string& text, const char* from, int flen, int olen) { |
no outgoing calls
no test coverage detected