My most common use case for reversing strings has not come up in Go yet -
basically, some languages provide a string search function that finds a
character or substring starting from the beginning of the string. For
example, in T-SQL, CharIndex. If they do not provide a corresponding search
tha
Hi,
On Sat, Feb 15, 2020 at 6:13 PM Amarjeet Anand
wrote:
> I need it quite often, maybe because of the kind of project am working on
> currently.
>
I'd be super curious what that is. TBH, given how frequently this has come
up, I've been wrecking my brain trying to figure out what people need i
One reason for not implementing it in the standard library is that there
are many possible implementations. Do you want to reverse combining
character sequences for example? Unicode is a complex beast and I suspect
that reversing a string rune-by-rune may easily break important semantics.
Is it eve
Thanks ian for the quick reply.
As far as other languages are concerned,
Like Java, stringBuilder.reverse() seems a logical place to put this
feature. Because string builder gives us facility to generate a string,
overcoming the limitation of string immutability. What if I want to
generate a strin
On Sat, Feb 15, 2020 at 8:37 AM Amarjeet Anand
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 functi
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.
-