inline static UBool
startsWithPrefix(const UChar* src , int32_t srcLength){
- UBool startsWithPrefix = TRUE;
-
if(srcLength < ACE_PREFIX_LENGTH){
return FALSE;
}
for(int8_t i=0; i< ACE_PREFIX_LENGTH; i++){
if(toASCIILower(src[i]) != ACE_PREFIX[i]){
- startsWithPrefix = FALSE;
+ return FALSE;
}
}
- return startsWithPrefix;
+ return TRUE;
}
for(int32_t j=0; j<srcLength; j++){
if(src[j]> 0x7f){
srcIsASCII = FALSE;
+ break;
}/*else if(isLDHChar(src[j])==FALSE){
// here we do not assemble surrogates
// since we know that LDH code points
private static final StringPrep namePrep = StringPrep.getInstance(StringPrep.RFC3491_NAMEPREP);
private static boolean startsWithPrefix(StringBuffer src){
- boolean startsWithPrefix = true;
-
if(src.length() < ACE_PREFIX.length){
return false;
}
for(int i=0; i<ACE_PREFIX.length;i++){
if(toASCIILower(src.charAt(i)) != ACE_PREFIX[i]){
- startsWithPrefix = false;
+ return false;
}
}
- return startsWithPrefix;
+ return true;
}
private static char toASCIILower(char ch){
while((ch = src.next())!= UCharacterIterator.DONE){
if(ch> 0x7f){
srcIsASCII = false;
+ break;
}
}
int failPos = -1;