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".
| 3780 | // FormatCountableNoun(1, "formula", "formuli") returns "1 formula". |
| 3781 | // FormatCountableNoun(5, "book", "books") returns "5 books". |
| 3782 | static internal::String FormatCountableNoun(int count, |
| 3783 | const char * singular_form, |
| 3784 | const char * plural_form) { |
| 3785 | return internal::String::Format("%d %s", count, |
| 3786 | count == 1 ? singular_form : plural_form); |
| 3787 | } |
| 3788 | |
| 3789 | // Formats the count of tests. |
| 3790 | static internal::String FormatTestCount(int test_count) { |
no test coverage detected