| 111 | } |
| 112 | |
| 113 | int codepoints(string str) |
| 114 | { |
| 115 | int len = 0; |
| 116 | for (char c : str) |
| 117 | if ((c & 0xc0) != 0x80) |
| 118 | ++len; |
| 119 | return len; |
| 120 | } |
| 121 | |
| 122 | string padded_str(const string &s, int pad_to, bool prepend) |
| 123 | { |
no outgoing calls
no test coverage detected