jboolean fastiva_vm_Character_C$__isWhitespaceImpl(jint codePoint) { // Java omits U+0085 if(codePoint == 0x0085) { return JNI_FALSE; } return u_isWhitespace(codePoint); }
//static jboolean Character_isWhitespaceImpl(JNIEnv*, jclass, jint codePoint) { JNIEXPORT jboolean JNICALL Java_java_lang_Character_isWhitespaceImpl(JNIEnv*, jclass, jint codePoint) { // Java omits U+0085 if(codePoint == 0x0085) { return JNI_FALSE; } return u_isWhitespace(codePoint); }
static int32_t u_scanf_ustring_handler(UFILE *input, u_scanf_spec_info *info, ufmt_args *args, const UChar *fmt, int32_t *fmtConsumed, int32_t *argConverted) { UChar *arg = (UChar*)(args[0].ptrValue); UChar *alias = arg; int32_t count; int32_t skipped = 0; UChar c; UBool isNotEOF = FALSE; /* skip all ws in the input */ if (info->fIsString) { skipped = u_scanf_skip_leading_ws(input, info->fPadChar); } /* get the string one character at a time, truncating to the width */ count = 0; while( (info->fWidth == -1 || count < info->fWidth) && (isNotEOF = ufile_getch(input, &c)) && (!info->fIsString || (c != info->fPadChar && !u_isWhitespace(c)))) { /* put the character from the input onto the target */ if (!info->fSkipArg) { *alias++ = c; } /* increment the count */ ++count; } /* put the final character we read back on the input */ if (!info->fSkipArg) { if((info->fWidth == -1 || count < info->fWidth) && isNotEOF) { u_fungetc(c, input); } /* add the terminator */ if (info->fIsString) { *alias = 0x0000; } } /* we converted 1 arg */ *argConverted = !info->fSkipArg; return count + skipped; }
static int32_t u_scanf_skip_leading_ws(UFILE *input, UChar pad) { UChar c; int32_t count = 0; UBool isNotEOF; /* skip all leading ws in the input */ while( (isNotEOF = ufile_getch(input, &c)) && (c == pad || u_isWhitespace(c)) ) { count++; } /* put the final character back on the input */ if(isNotEOF) u_fungetc(c, input); return count; }
static jboolean Character_isWhitespaceImpl(JNIEnv*, jclass, jint codePoint) { return u_isWhitespace(codePoint); }
inline bool ISSPACE(const UChar c) { if (c <= 0xFF && c != 0x09 && c != 0x0A && c != 0x0D && c != 0x20 && c != 0xA0) { return false; } return (c == 0x20 || c == 0x09 || c == 0x0A || c == 0x0D || c == 0xA0 || u_isWhitespace(c)); }
// Determines if the specified code point is a whitespace character // A character is considered to be a whitespace character if and only // if it satisfies one of the following criteria: // - It is a Unicode Separator character (categories "Z" = "Zs" or "Zl" or "Zp"), // but is not also a non-breaking space (U+00A0 NBSP or U+2007 Figure Space // or U+202F Narrow NBSP). // - It is U+0009 HORIZONTAL TABULATION. // - It is U+000A LINE FEED. // - It is U+000B VERTICAL TABULATION. // - It is U+000C FORM FEED. // - It is U+000D CARRIAGE RETURN. // - It is U+001C FILE SEPARATOR. // - It is U+001D GROUP SEPARATOR. // - It is U+001E RECORD SEPARATOR. // - It is U+001F UNIT SEPARATOR. bool BUnicodeChar::IsWhitespace(uint32 c) { BUnicodeChar(); return u_isWhitespace(c); }
/* * imp: common/uchar.c * hdr: common/unicode/uchar.h * @stable ICU 2.0 */ U_CAPI UBool U_EXPORT2 u_isWhitespace_4_0(UChar32 c) { return u_isWhitespace(c); }
static int32_t u_scanf_string_handler(UFILE *input, u_scanf_spec_info *info, ufmt_args *args, const UChar *fmt, int32_t *fmtConsumed, int32_t *argConverted) { const UChar *source; UConverter *conv; char *arg = (char*)(args[0].ptrValue); char *alias = arg; char *limit; UErrorCode status = U_ZERO_ERROR; int32_t count; int32_t skipped = 0; UChar c; UBool isNotEOF = FALSE; /* skip all ws in the input */ if (info->fIsString) { skipped = u_scanf_skip_leading_ws(input, info->fPadChar); } /* get the string one character at a time, truncating to the width */ count = 0; /* open the default converter */ conv = u_getDefaultConverter(&status); if(U_FAILURE(status)) return -1; while( (info->fWidth == -1 || count < info->fWidth) && (isNotEOF = ufile_getch(input, &c)) && (!info->fIsString || (c != info->fPadChar && !u_isWhitespace(c)))) { if (!info->fSkipArg) { /* put the character from the input onto the target */ source = &c; /* Since we do this one character at a time, do it this way. */ if (info->fWidth > 0) { limit = alias + info->fWidth - count; } else { limit = alias + ucnv_getMaxCharSize(conv); } /* convert the character to the default codepage */ ucnv_fromUnicode(conv, &alias, limit, &source, source + 1, NULL, TRUE, &status); if(U_FAILURE(status)) { /* clean up */ u_releaseDefaultConverter(conv); return -1; } } /* increment the count */ ++count; } /* put the final character we read back on the input */ if (!info->fSkipArg) { if ((info->fWidth == -1 || count < info->fWidth) && isNotEOF) u_fungetc(c, input); /* add the terminator */ if (info->fIsString) { *alias = 0x00; } } /* clean up */ u_releaseDefaultConverter(conv); /* we converted 1 arg */ *argConverted = !info->fSkipArg; return count + skipped; }
static int utf8_codepoint_is_whitespace(UChar32 c) { return (u_isWhitespace(c) == TRUE); }