コード例 #1
0
ファイル: NativePluralRules.cpp プロジェクト: OMFGB/libcore
static jint NativePluralRules_quantityForIntImpl(JNIEnv*, jclass, jint address, jint value) {
    UnicodeString keyword = toPluralRules(address)->select(value);
    if (keyword == "zero") {
        return 0;
    } else if (keyword == "one") {
        return 1;
    } else if (keyword == "two") {
        return 2;
    } else if (keyword == "few") {
        return 3;
    } else if (keyword == "many") {
        return 4;
    } else {
        return 5;
    }
}
コード例 #2
0
ファイル: NativePluralRules.cpp プロジェクト: OMFGB/libcore
static void NativePluralRules_finalizeImpl(JNIEnv*, jclass, jint address) {
    delete toPluralRules(address);
}
コード例 #3
0
extern "C" void Java_libcore_icu_NativePluralRules_finalizeImpl(JNIEnv*, jclass, jlong address) {
    delete toPluralRules(address);
}