Repository navigation
v2.7.0 - Wasm: String slice & search methods
Wasm: String slice & search methods
The on-the-fly WebAssembly compiler now supports the common String slice/search methods over its [len][utf8] layout:
substring(start, [end])— a fresh-buffermemory.copyslicecodeUnitAt(i)startsWith/endsWith— OOB-guarded byte compareindexOf(returns-1when absent) /contains
These join the already-supported length / isEmpty / isNotEmpty getters and toUpperCase / toLowerCase. Methods are byte-indexed, so results are exact for ASCII text.
Still to come: trim, split, replaceAll / replaceFirst, padLeft / padRight, compareTo, index []; and chaining a method onto a method result (the receiver must be a named local).
Full changelog: https://github.com/ApolloVM/apollovm_dart/blob/v2.7.0/CHANGELOG.md