From: Mark D. <mar...@jt...> - 2002-10-25 03:46:45
|
It should be hasMoreCodePointsThan (plural code points) Mark __________________________________ http://www.macchiato.com ► “Eppur si muove” ◄ ----- Original Message ----- From: "syn wee" <syn...@jt...> To: <ic...@os...>; <icu...@os...> Sent: Thursday, October 24, 2002 17:10 Subject: ICU4J proposal to add hasMoreCodePointThan APIs to com.ibm.icu.text.UTF16 > 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 > |