Quick actions

cmd+k|ctrl+k

Navigation

Languages

100knock #00

Snippet info

Language

Go

Visibility

public

Author

re3turn

Created

2018-05-07T12:32:22Z

Updated

2018-05-07T15:03:07Z

package main

import (
    "fmt"
)

func reverce(s string) string {
    str := make([]byte, len(s))
    for i, j := len(s) - 1, 0; i >= 0; i-- {
        str[j] = s[i]
        j++
    }
    
    return string(str)
}

func main() {
    strings := "stressed"
    
    fmt.Println(reverce(strings))
}
INFO