Texto reverso em golang
package mainimport “fmt”func main() { s := “Hello, playground” fmt.Println(s) fmt.Println(Reverse(s)) fmt.Println(ReverseUsingRunes(s))}func Reverse(s string) string { var reverse string for i := len(s)-1; i >= 0; i– { reverse += …
Continuar lendo