WASM: Implement wasm-native strings part 1

There are several changes here but they all required for at least one test to pass.
- Implemented String class and several utility functions using built-in CharArray
- Added new constant memory segment to hold string literals and required funcs to work with them
- Added very crude mostly incorrect rudimentary ability to pass strings back to javascript
This commit is contained in:
Igor Laevsky
2021-07-23 16:11:45 +03:00
committed by TeamCityServer
parent 9ccdffe8ad
commit 0f84525bdc
20 changed files with 229 additions and 84 deletions
+1 -1
View File
@@ -287,7 +287,7 @@ public actual fun CharArray.concatToString(startIndex: Int, endIndex: Int): Stri
*/
@SinceKotlin("1.3")
@ExperimentalStdlibApi
public actual fun String.toCharArray(): CharArray = TODO("Wasm stdlib: Text")
public actual fun String.toCharArray(): CharArray = this.chars
/**
* Returns a [CharArray] containing characters of this string or its substring.