rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

add Belt.String

Open bobzhang opened this issue 7 years ago • 4 comments

see #2758 This PR is just throwing some ideas so that the least controversial API could be added. It would be nice that people could take the ownership of the PR

bobzhang avatar Apr 19 '18 11:04 bobzhang

What would need to be added to the above PR for it to be merged?

Given it makes heavy use of external functions how would it be used when compiling to native?

lpil avatar May 14 '18 18:05 lpil

it will be compiled into native via conditional compilation

bobzhang avatar May 15 '18 23:05 bobzhang

I wonder what's left to move this forward?

IF native related issues aren't valid anymore, @bloodyowl 's String binding seems an excellent candidate to have. (it contains some ES8+, though)

I know there has been discussion about SubString type, but that's tangential when the only target is JS, right?

As s ReScript user, with -open Belted, what I want most is type-safe and ergonomic Belt.String, not Js.String2. 🥺

namenu avatar Aug 18 '21 14:08 namenu

@namenu Indeed, we should have this module in Belt. It is not done yet is mostly because of lack of time, contributions are welcome! (We also need some one to help review the code)

bobzhang avatar Aug 19 '21 01:08 bobzhang

Superseded by the String module in the new ReScript "Core" standard library.

https://github.com/rescript-association/rescript-core/blob/main/src/Core__String.res

cknitt avatar May 02 '23 19:05 cknitt