Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
9b1e6fdd
Commit
9b1e6fdd
authored
Aug 12, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix one syntax error in declaration.
reformat the bullet list about strings R=gri OCL=14128 CL=14128
parent
68fb2d04
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
go_lang.txt
doc/go_lang.txt
+1
-6
No files found.
doc/go_lang.txt
View file @
9b1e6fdd
...
@@ -444,19 +444,14 @@ Strings behave like arrays of bytes, with the following properties:
...
@@ -444,19 +444,14 @@ Strings behave like arrays of bytes, with the following properties:
- They are immutable: after creation, it is not possible to change the
- They are immutable: after creation, it is not possible to change the
contents of a string.
contents of a string.
- No internal pointers: it is illegal to create a pointer to an inner
- No internal pointers: it is illegal to create a pointer to an inner
element of a string.
element of a string.
- They can be indexed: given string "s1", "s1[i]" is a byte value.
- They can be indexed: given string "s1", "s1[i]" is a byte value.
- They can be concatenated: given strings "s1" and "s2", "s1 + s2" is a value
- They can be concatenated: given strings "s1" and "s2", "s1 + s2" is a value
combining the elements of "s1" and "s2" in sequence.
combining the elements of "s1" and "s2" in sequence.
- Known length: the length of a string "s1" can be obtained by the function/
- Known length: the length of a string "s1" can be obtained by the function/
operator "len(s1)". The length of a string is the number of bytes within.
operator "len(s1)". The length of a string is the number of bytes within.
Unlike in C, there is no terminal NUL byte.
Unlike in C, there is no terminal NUL byte.
- Creation 1: a string can be created from an integer value by a conversion;
- Creation 1: a string can be created from an integer value by a conversion;
the result is a string containing the UTF-8 encoding of that code point.
the result is a string containing the UTF-8 encoding of that code point.
"string('x')" yields "x"; "string(0x1234)" yields the equivalent of "\u1234"
"string('x')" yields "x"; "string(0x1234)" yields the equivalent of "\u1234"
...
@@ -626,7 +621,7 @@ formal parameters for functions.
...
@@ -626,7 +621,7 @@ formal parameters for functions.
[] uint8
[] uint8
[2*n] int
[2*n] int
[64] struct { x, y
:
int32; }
[64] struct { x, y int32; }
[1000][1000] float64
[1000][1000] float64
The length of an array can be discovered at run time (or compile time, if
The length of an array can be discovered at run time (or compile time, if
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment