String Manipulation
String Manipulation — Studio Pro 10.24.17
Fixed
codePointAt crashed instead of reporting bad input. Its guard called a trim function that was never defined or imported, so a null input raised ReferenceError: trim is not defined rather than the intended "input should not be empty". The same guards used && where || was meant, so neither could fire for ordinary input, and position == null && position >= 0 could never be true at all.
The action now validates input and position properly, rejects a negative or non-whole position with a clear message, and returns the code point as the declared Big type rather than a raw number.
This defect predates the 10.24.17 upgrade.
Known remaining issues
The following are documented but not yet fixed, as changing them would alter existing signatures:
prevGraphemeClusterBreakdeclares a String return type but returns an integer index, and omits the library's optionalfromIndex— so it can only ever find the last break, despite its description.ltrimNdocumentation says it trims from the end; it trims from the beginning. The text is copied fromrtrimN.nextCodePointIndexandnextGraphemeClusterBreakname their second parameterlength, but it is a position (fromIndex), not a length.substringAfterLastmakesfromIndexmandatory although the library defaults it to the end of the string; passing 0 narrows the search rather than widening it.
Notes
35 actions over the bundled @stdlib/string 0.2.1. Studio Pro 10.24.17, imports with 0 errors. Import StringManipulation.mpk via App Explorer > Import module package.