-
Notifications
You must be signed in to change notification settings - Fork 19k
go/constant: add StringLen function #79042
Copy link
Copy link
Open
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposalProposal-Accepted
Milestone
Metadata
Metadata
Assignees
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposalProposal-Accepted
Type
Projects
Status
Todo
Status
Accepted
The proposal is to add the following function to the go/constant package:
This allows the determination of the length of a String value w/o having to call
StringVal.(
StringValcauses the construction and thus allocation of a new single string if the actual string value was created via addition of many substrings.)