Repository navigation
v2.8.0 - Wasm: String trim & pad methods
Wasm: String trim & pad methods
The on-the-fly WebAssembly compiler now supports the String trim/pad methods over its [len][utf8] layout:
trim()/trimLeft()/trimRight()— strip ASCII whitespace (space,\t..\r)padLeft(width, [pad])/padRight(width, [pad])— single-byte pad (default space); a width not exceeding the length is a plain copy
These join the slice/search methods (substring, codeUnitAt, startsWith/endsWith, indexOf, contains) from 2.7.0. Byte-indexed, so exact for ASCII text.
Still to come: split, replaceAll / replaceFirst, index [], and compareTo (which also needs String.compareTo in the interpreter core first).
Full changelog: https://github.com/ApolloVM/apollovm_dart/blob/v2.8.0/CHANGELOG.md