uschindler commented on code in PR #16371:
URL: https://github.com/apache/lucene/pull/16371#discussion_r3675605225


##########
lucene/core/src/java/org/apache/lucene/analysis/CharacterUtils.java:
##########
@@ -68,6 +69,31 @@ public static void toLowerCase(final char[] buffer, final 
int offset, final int
     }
   }
 
+  /**
+   * Applies Unicode simple case folding to each codepoint starting at the 
given offset.
+   *
+   * @param buffer the char buffer to fold
+   * @param offset the offset to start at
+   * @param limit the max char in the buffer to fold
+   */
+  public static void simpleCaseFold(final char[] buffer, final int offset, 
final int limit) {
+    assert buffer.length >= limit;
+    assert 0 <= offset && offset <= buffer.length;
+    for (int i = offset; i < limit; i++) {
+      char c = buffer[i];
+      if (c > 127) {

Review Comment:
   maybe add the same comments like in previous toLowerCase method. Also down 
for the pure A..Z block with the 5th bit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to