Formats a countable noun. Depending on its quantity, either the singular form or the plural form is used. e.g. FormatCountableNoun(1, "formula", "formuli") returns "1 formula". FormatCountableNoun(5, "book", "books") returns "5 books".
| 4347 | // FormatCountableNoun(1, "formula", "formuli") returns "1 formula". |
| 4348 | // FormatCountableNoun(5, "book", "books") returns "5 books". |
| 4349 | static std::string FormatCountableNoun(int count, |
| 4350 | const char * singular_form, |
| 4351 | const char * plural_form) { |
| 4352 | return internal::StreamableToString(count) + " " + |
| 4353 | (count == 1 ? singular_form : plural_form); |
| 4354 | } |
| 4355 | |
| 4356 | // Formats the count of tests. |
| 4357 | static std::string FormatTestCount(int test_count) { |
no test coverage detected