diff --git a/doc/go_spec.html b/doc/go_spec.html index cc2bada913..098a92551a 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -823,6 +823,7 @@ particular architecture.
A string type represents the set of string values.
A string value is a (possibly empty) sequence of bytes.
+The number of bytes is called the length of the string and is never negative.
Strings are immutable: once created,
it is impossible to change the contents of a string.
The predeclared string type is string;
@@ -830,7 +831,7 @@ it is a defined type.
-The length of a string s (its size in bytes) can be discovered using
+The length of a string s can be discovered using
the built-in function len.
The length is a compile-time constant if the string is a constant.
A string's bytes can be accessed by integer indices
@@ -846,8 +847,7 @@ string, &s[i] is invalid.
An array is a numbered sequence of elements of a single type, called the element type. -The number of elements is called the length and is never -negative. +The number of elements is called the length of the array and is never negative.
@@ -883,6 +883,7 @@ multi-dimensional types.
A slice is a descriptor for a contiguous segment of an underlying array and
provides access to a numbered sequence of elements from that array.
A slice type denotes the set of all slices of arrays of its element type.
+The number of elements is called the length of the slice and is never negative.
The value of an uninitialized slice is nil.
@@ -891,8 +892,7 @@ SliceType = "[" "]" ElementType .
-Like arrays, slices are indexable and have a length. The length of a
-slice s can be discovered by the built-in function
+The length of a slice s can be discovered by the built-in function
len; unlike with arrays it may change during
execution. The elements can be addressed by integer indices
0 through len(s)-1. The slice index of a