diff --git a/java/src/com/android/inputmethod/latin/utils/StringUtils.java b/java/src/com/android/inputmethod/latin/utils/StringUtils.java
index 8fc245d9be6c596c68a788a5792699838c820d7c..6f15b11bfa4edc074cab8b59a8ff43fc22388209 100644
--- a/java/src/com/android/inputmethod/latin/utils/StringUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/StringUtils.java
@@ -174,6 +174,13 @@ public final class StringUtils {
         return toCodePointArray(string, 0, string.length());
     }
 
+    /**
+     * Converts a range of a string to an array of code points.
+     * @param string the source string.
+     * @param startIndex the start index inside the string in java chars, inclusive.
+     * @param endIndex the end index inside the string in java chars, exclusive.
+     * @return a new array of code points. At most endIndex - startIndex, but possibly less.
+     */
     public static int[] toCodePointArray(final String string,
             final int startIndex, final int endIndex) {
         final int length = string.length();