// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * Copyright (C) 2015, International Business Machines Corporation * and others. All Rights Reserved. ******************************************************************************* * standardplural.h * * created on: 2015dec14 * created by: Markus W. Scherer */ #ifndef __STANDARDPLURAL_H__ #define __STANDARDPLURAL_H__ #include "unicode/utypes.h" #if !UCONFIG_NO_FORMATTING U_NAMESPACE_BEGIN class UnicodeString; /** * Standard CLDR plural form/category constants. * See http://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules */ class U_I18N_API StandardPlural { public: enum Form { ZERO, ONE, TWO, FEW, MANY, OTHER, EQ_0, EQ_1, COUNT }; /** * @return the lowercase CLDR keyword string for the plural form */ static const char *getKeyword(Form p); /** * @param keyword for example "few" or "other" * @return the plural form corresponding to the keyword, or OTHER */ static Form orOtherFromString(const char *keyword) { return static_cast