We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
string:substring
Implement in C the substring function defined in lang.string.
substring
lang.string
The text was updated successfully, but these errors were encountered:
The substring function is defined here: https://ballerina.io/spec/lang/2022R1/#lang.string
The implementation should be added to runtime/string.c. The runtime representation of strings is described here: https://github.com/ballerina-platform/nballerina/blob/main/docs/rtvalue.md#string
runtime/string.c
Note that what makes this non-trivial is that startIndex and endIndex use units of code points not bytes.
Sorry, something went wrong.
There are also examples of how to work with the string representation in runtime/tests/string_*.c. The substring function will need tests added there.
runtime/tests/string_*.c
No branches or pull requests
Implement in C the
substring
function defined inlang.string
.The text was updated successfully, but these errors were encountered: