This has now been implemented for the next release: https://feedback.objo.dev/feature/786
String.FromCodePoints() now has three forms:
String.FromCodePoints(codePoints)
String.FromCodePoints(codePoints, startIndex)
String.FromCodePoints(codePoints, startIndex, count)
The second form converts from startIndex to the end of the array. The third converts exactly count code points:
Var points() As Integer = [91, 65, 9829, 128640, 93]
Print(String.FromCodePoints(points, 1)) # A♥🚀]
Print(String.FromCodePoints(points, 1, 3)) # A♥🚀
These overloads read directly from the original array, avoiding the need to allocate and populate a temporary array.
startIndex may equal the array’s Count, and count may be zero, in which case an empty string is returned. Negative values or ranges extending beyond the array raise a runtime error.