Open yorkie opened 6 years ago
Another alternative is https://uriparser.github.io/doc/api/latest/ but it's written in C++.
I will try to resolve this feature, it looks fun.
jerry and iotjs 's apis seem no utf8 string operation functions, i'm going to add some functions to utf8, but I don't know where to write these operations.
In addition, we want to rewrite all APIs to c/c++ as much as possible?
What utf8 operations would you like to use?
What utf8 operations would you like to use?
just like codeUnit or other something. there are many charCodeAt operation in the url.js, you can see here. if want to rewrite as much as possible using c/c++, utf8 string operations are indispensable.
For the case you mentioned, jerry_substring_to_utf8_char_buffer
might appropriate to use.
jerry_substring_to_utf8_char_buffer
I don't know if there is a performance problem with this method. There is a copy operation inside, but we will get one point code frequently.
I rewrite it using jerry_substring_to_utf8_char_buffer
firstly anyway. thanks @legendecas :)
I have done some, it will take some time to estimate (about 2days) , but my work is a bit busy now, it is not guaranteed. if you have time, you can take over it :(
@ErosZy Hey, it's not in such a hurry. You could take your time. :)
Is your feature request related to a problem? Please describe. The current URL implementation is copied from Node.js, which includes over 1000 lines JavaScript source code, it's better to implement it in C/C++ for performance and memory usage.
Describe the solution you'd like https://github.com/jacketizer/libyuarel looks good an alternative impl for URL.