- virtual int32_t matches(UText *text, int32_t maxLength, int32_t *lengths, int32_t &count,
- int32_t limit, int32_t *values = NULL) const = 0;
+ /* @param text The text in which to look for matching words. Matching begins
+ * at the current position of the UText.
+ * @param maxLength The max length of match to consider. Units are the native indexing
+ * units of the UText.
+ * @param limit Capacity of output arrays, which is also the maximum number of
+ * matching words to be found.
+ * @param lengths output array, filled with the lengths of the matches, in order,
+ * from shortest to longest. Lengths are in native indexing units
+ * of the UText. May be NULL.
+ * @param cpLengths output array, filled with the lengths of the matches, in order,
+ * from shortest to longest. Lengths are the number of Unicode code points.
+ * May be NULL.
+ * @param values Output array, filled with the values associated with the words found.
+ * May be NULL.
+ * @param prefix Output parameter, the code point length of the prefix match, even if that
+ * prefix didn't lead to a complete word. Will always be >= the cpLength
+ * of the longest complete word matched. May be NULL.
+ * @return Number of matching words found.
+ */
+ virtual int32_t matches(UText *text, int32_t maxLength, int32_t limit,
+ int32_t *lengths, int32_t *cpLengths, int32_t *values,
+ int32_t *prefix) const = 0;
+