aboutsummaryrefslogtreecommitdiff
path: root/src/strings
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2016-09-06 17:26:15 -0700
committerRobert Griesemer <gri@golang.org>2016-09-07 04:28:35 +0000
commit238274df4eee1752f51b288a11eddaf5365123bf (patch)
tree1d46191e653acc19958477082e4dce8c990d64f1 /src/strings
parentbdb3b790c66444c388529fa1d9b3f4d6aaa4c13f (diff)
downloadgo-238274df4eee1752f51b288a11eddaf5365123bf.tar.xz
go/constant: document that Value.String and ExactString return quoted strings
This has always been the case but it was not obvious from the documentation. The reason for the quoting is that String() may return an abbreviated string, starting with double-quote (") but ending in ... (w/o a quote). The missing quote indicates the abbreviation (in contrast to a string ending in ..."). constant.StringVal can be used to obtain the unquoted string of a String Value. Change-Id: Id0ba45b6ff62b3e024386ba8d907d6b3a4fcb6d7 Reviewed-on: https://go-review.googlesource.com/28576 Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/strings')
0 files changed, 0 insertions, 0 deletions