From: Alan L. <ala...@jt...> - 2002-10-25 03:37:44
|
I think it reads better as "code points": ^ hasMoreCodePointsThan() At 05:10 PM 10/24/2002 -0700, syn wee wrote: >ICU4J proposal to add hasMoreCodePointThan APIs to com.ibm.icu.text.UTF16. >Please respond with comments by Nov 7th 2002. > >3 APIs will be added to the class UTF16 > >public static boolean hasMoreCodePointThan(java.lang.String source, > int number) >public static boolean hasMoreCodePointThan(java.lang.StringBuffer source, > int number) >public static boolean hasMoreCodePointThan(char[] source, > int start, > int limit, > int number) > >All 3 APIs check if the source argument contains more Unicode code points >than a certain number. This is more efficient than counting all code points >in the entire source argument and comparing that number with a threshold. >This function may not need to scan the source at all, if the length for >String and StringBuffer argument, or the argument start and limit for char[] >arguments, is within a certain range. These APIs never needs to count more >than 'number + 1' code points. Logically equivalent to >(countCodePoint(source, start, limit) > number). A Unicode code point may >occupy either one or two code units. > >Parameters description: >source - UTF-16 chars source, either a String, StringBuffer or a char[] >start - offset to substring in the source array for analyzing (only if >source is a char[]) >limit - offset to substring in the source array for analyzing (only if >source is a char[]) >number - The number of code points in the string is compared against the >'number' > parameter. >Returns: >boolean value for whether the source contains more Unicode code points than >'number' > >_______________________________________________ >icu mailing list >ic...@os... >http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu |