Skip to content

Add String.getUnsafe #208

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

Closed
ryyppy opened this issue Apr 2, 2024 · 0 comments · Fixed by #223
Closed

Add String.getUnsafe #208

ryyppy opened this issue Apr 2, 2024 · 0 comments · Fixed by #223

Comments

@ryyppy
Copy link
Member

ryyppy commented Apr 2, 2024

Needed to be able to migrate from OCaml's String.get(s, i) interface.

Basically this:

@get_index external getUnsafe: (string, int) => string = ""

Note that this is technically not the correct translation from its original function, which actually returns a char value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant