June 2021
Intermediate to advanced
304 pages
7h 49m
English
This chapter discusses how to handle strings in WAT because WebAssembly doesn’t have a built-in string data type as high-level languages do. To represent string data in WebAssembly, you must set linear memory to ASCII or Unicode character values. You need to know where you’re setting your data in linear memory and how many bytes the string will use.
In this chapter, we’ll look at the ASCII and Unicode character formats before we explore the relationship between string objects and how to store them in linear memory. You’ll learn how JavaScript can retrieve the strings from linear memory and output them to the command ...
Read now
Unlock full access