String Type
See original GitHub issueCould we consider the inclusion of string types?
It may be an immutable subtype of extern
.
String type marker:
arg = ""+arg;
It would have the following expressions:
str.length
: size of the string (a constant). Type:unsigned
.str.charCodeAt(index)
: character code, a nonnegative integer less than 2^16. Type:(unsigned) → fixnum
.
This is motivated by the idea that converting an external string into a typed array before passing it in an asm.js exported function is probably not the most efficient approach. Yet, in my experience, string parsing in JS can be boosted a lot.
Issue Analytics
- State:
- Created 11 years ago
- Comments:30
Top Results From Across the Web
String Data Type – Programming Fundamentals - Rebus Press
A string data type is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter...
Read more >Character string data types - IBM
Character strings are the most commonly used data types. They can hold any sequence of letters, digits, punctuation, and other valid characters.
Read more >MySQL 8.0 Reference Manual :: 11.3 String Data Types
The string data types are CHAR , VARCHAR , BINARY , VARBINARY , BLOB , TEXT , ENUM , and SET . For...
Read more >C++ String Data Type - W3Schools
The string type is used to store a sequence of characters (text). This is not a built-in type, but it behaves like one...
Read more >String Data Type - Visual Basic | Microsoft Learn
Use the String data type to hold multiple characters without the array management overhead of Char() , an array of Char elements.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Out of curiosity, what are you guys planning to make (or have made) with asm.js + StringView?
@cscott P.S. I have updated the StringView page on MDN with your suggestions. I have also updated the makeIndex() method ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays/StringView#StringView.prototype.makeIndex() ) Bye 😃