9951 explained code solutions for 126 technologies


golangHow to get substring from string


package main
import "fmt"
func main() {
  str := "some val!"
  fmt.Println(str[5:])
}ctrl + c
package main

default package declaration

func main() {

declare main function that will be launched automatically

"some val!"

sample string

str[5:]

extracts substring from position 5 and to the end of it