Prototype: codePointLength(String text) -> int returns the Unicode code-point count; empty gives zero.
Final: sliceCodePoints(String text,int from,int to) -> String selects [from,to) measured in code points, preserving the exact sequence without case conversion/normalization. Require 0 <= from <= to <= code-point count, otherwise IllegalArgumentException. Empty slices are valid, including at the end. Do not split a surrogate pair; input is well-formed UTF-16. Combining marks count separately.
Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
Loading editor…
No results yet.
Complete the starter code, then run the checks.
Results and errors will appear here.
Java runs on this device with CheerpJ 4.3.