FSharpPlus icon indicating copy to clipboard operation
FSharpPlus copied to clipboard

Rename string trim functions

Open cmeeren opened this issue 4 years ago • 5 comments

As requested in https://github.com/fsprojects/FSharpPlus/issues/288#issuecomment-619355229

cmeeren avatar Apr 25 '20 16:04 cmeeren

Looks good. Looks like trimboth is used in python. Another alternative is to use the word strip.

wallymathieu avatar Apr 25 '20 16:04 wallymathieu

It would be good to hear some people chime in here 😃

wallymathieu avatar Apr 25 '20 16:04 wallymathieu

I think we should stick to some version of trim because it's what .NET users expect.

Some alternatives to trimBoth are trimStartEnd and trimChars (though in the latter case it's not consistent with trimStart and trimEnd).

cmeeren avatar Apr 25 '20 16:04 cmeeren

That's true. Let's see what people says 😃

wallymathieu avatar Apr 26 '20 07:04 wallymathieu

I think I would be in favor of this change, but of course in case we approve it, it will have to be for v2.0

In the meantime it would be interesting to hear other voices. Maybe @cannorin can comment as he added many string functions to the lib.

gusty avatar Apr 27 '20 11:04 gusty