Maybe the implementation in Java is something you could steal to save time. Have a look into class StringBuilder where there is a reverse() method. It does the reversion differently depending on whether dealing with UTF16 or not.
Am Samstag, 15. Februar 2020 17:37:15 UTC+1 schrieb Amarjeet Anand: > > Hi > > 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. > > > -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/934265f6-666b-446b-aa5e-73f0b2bdcd78%40googlegroups.com.