spec: documentation of len() in string type unclear #28736
Labels
Documentation
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
go/doc/go_spec.html
Line 833 in f58b02a
The documentation on how specifically
len()
can be used to determine the size of a string type in bytes can be confusing as this would make you expect thatlen("go")
would return16
(likeunsafe.Sizeof("go")
would) but actually gives you2
I would like to ask for a better phrasing of how to use
len()
on string type in the docsThe text was updated successfully, but these errors were encountered: