Added HelloWorld example as requested #107
Conversation
* fixes #83 * NAPI example for working with UTF-8 encoded strings
Added execution of ./lib/buid.sh
inital upload
|
I'll have to look a bit more closely but one thing about the rename is that we have use common names across the n-api node-addon-api and the other examples. For that reason we would either need to keep the original naming and the new example in a new directory or rename the corresponding example for the other approaches as well (node-addon-api, nan, etc) |
|
@mhdawson Could you elaborate on your proposition with a precise example regarding this specific pull request? So there won't be any additional mistakes. |
|
I'd suggest adding a new example called "string_handling" with the focus on showing how to use the string functions. The starting point could be the hello world example, but getting/creating more strings, with each set of commands that gets/creates a string illustrating one of the points which is not clear. For example, the different ways that you can create a string which is null terminate (using auto length, getting the length and then specifying it etc. The output itself might just be Hello world string1, string2, string3 etc. but the code whichs gets/creates string1, string2, etc. would be comment to illustrate and explain the gotcha/issues you ran into? Ideally, the same example could also be implemented in plain N-API (in addition to to node-addon-api) Does that make sense? |
|
@theAkito are you still planning to work on this? |
See #83 (comment)
Reading the readme files in the repository and the first HelloWorld example didn't clarify how I should structure this example properly, so I hope you could help me do it right, in case I made a mistake.