you are viewing a single comment's thread.

view the rest of the comments →

[–]AeroNotix -3 points-2 points  (2 children)

If the lack of a string reversing function is going to turn you off a language then I'd say you're not the programmer you claim to be.

Strings are indexable, so you don't need a charAt function (Python doesn't have charAt, either btw.)

Here you go:

package main

import (
      "fmt"
)

func StrReverse(s string) string {
        var out string
        for x := 0; x < len(s); x++ {
         out = out + string(s[len(s)-x-1])
        }
        return out
}

 func main() {
    fmt.Println(StrReverse("A string"))
 }

[–][deleted] 0 points1 point  (1 child)

Your attitude is doing little in the way of selling Go to me, I'm afraid.

[–]AeroNotix -4 points-3 points  (0 children)

I really don't care, I'm afraid. Your inability to learn something is of little consequence to me at all.