How to get the length of a string in Go

1 Answer

0 votes
package main

import "fmt"

func main() {
    var s string = "Go Java C"

    fmt.Printf("%d", len(s))
}




/*
run:
 
9
 
*/

 

 



answered Jun 11, 2023 by avibootz
...