On 02/06/2014 10:30 AM, Ulf Zibis wrote:
Am 06.02.2014 18:40, schrieb Xueming Shen:
Ulf,
webrev has been updated to use isBmpCodePoint() as suggested. Another
benefit of using isBmpCodePoint() is that some Character.ERROR checks
are no longer necessary
Great, I didn't see that.
But why not just coding:
2558 char ch = value[first];
2559 if (Character.isSurrogate(ch) {
2560 hasSurr = true;
2561 break;
2562 }
2563 if (ch != Character.toLowerCase((int)ch)) { // no need to
check Character.ERROR
2564 break;
2565 }
-Ulf
There is no measurable difference. I'm fine with either way. Given we are on
a 32/64-bit platform, it might be better to just use the "word" size type? :-)
-Sherman