-
Notifications
You must be signed in to change notification settings - Fork 682
Add API documentation for create string from a valid UTF8 string functions. #1444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API documentation for create string from a valid UTF8 string functions. #1444
Conversation
49facac
to
c29006e
Compare
|
||
Create string from a valid UTF8 string. | ||
|
||
*Note*: It differs from [jerry_create_string](#jerry_create_string) function in this converts all 4-bytes long unicode sequences into two 3-bytes long sequences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference from ... is that it accepts utf-8 string instead of cesu-8 string.
@@ -339,6 +339,13 @@ main (void) | |||
TEST_ASSERT (sz == 0); | |||
jerry_release_value (args[0]); | |||
|
|||
// Test create_jerry_string_from_utf8 with 4-byte long unicode sequences | |||
args[0] = jerry_create_string_from_utf8 ((jerry_char_t *) "𝔡𝔢𝔣𝔤"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer for using \x.. byte sequence instead of real characters (since you don't know the character code of these characters). A four byte long sequence should be part of it as well.
c29006e
to
1d2bd8a
Compare
…ate_string_sz_from_utf8 functions. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka [email protected]
1d2bd8a
to
b4bb2ef
Compare
Thanks, I've updated this patch. |
LGTM |
1 similar comment
LGTM |
No description provided.