| 152 | } |
| 153 | |
| 154 | static inline string pad_string(string text, const int size, const bool front = true, const bool trim = false) |
| 155 | { |
| 156 | if (text.length() > size_t(size)) |
| 157 | { |
| 158 | if (trim && size > 10) |
| 159 | { |
| 160 | text = text.substr(0, size-3); |
| 161 | text.append("..."); |
| 162 | } |
| 163 | return text; |
| 164 | } |
| 165 | |
| 166 | string aligned(size - text.length(), ' '); |
| 167 | if (front) |
| 168 | { |
| 169 | aligned.append(text); |
| 170 | return aligned; |
| 171 | } |
| 172 | else |
| 173 | { |
| 174 | text.append(aligned); |
| 175 | return text; |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | static inline df::interface_key get_string_key(const std::set<df::interface_key> *input) |
| 180 | { |
no test coverage detected