/* * Here provide a series of helpers in the str_$TRUE_$FALSE format (you can * also expand some helpers as needed), where $TRUE and $FALSE are their * corresponding literal strings. These helpers can be used in the printing * and also in other places where constant strings are required. Using these * helpers offers the following benefits: * 1) Reducing the hardcoding of strings, which makes the code more elegant * through these simple literal-meaning helpers. * 2) Unifying the output, which prevents the same string from being printed * in various forms, such as enable/disable, enabled/disabled, en/dis. * 3) Deduping by the linker, which results in a smaller binary file.
*/
/** * str_plural - Return the simple pluralization based on English counts * @num: Number used for deciding pluralization * * If @num is 1, returns empty string, otherwise returns "s".
*/ staticinlineconstchar *str_plural(size_t num)
{ return num == 1 ? "" : "s";
}
#endif
¤ Dauer der Verarbeitung: 0.21 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.