On Sat, Feb 15, 2020 at 8:37 AM Amarjeet Anand <[email protected]> wrote: > > I was wondering why isn't there built-in string reverse function. Is it left > intentionally because of some reason? > > Although strings are immutable in go, there are multiple ways to achieve this > pretty easily. But having this function inbuilt will save our time because we > need it quite often.
It's been suggested, but it doesn't seem to come up that much, and it's easy to write your own version. Also, other languages don't seem to provide a corresponding function in their standard libraries. If you want to argue that it should be in the standard library, it would help to see several different cases where it comes up in real Go code. https://golang.org/doc/faq#x_in_std Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVcPNNaW0R4Qp6xgVo6XmbPR8j3%2BuMSC80MTCbmvn3auQ%40mail.gmail.com.
