Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
65348a89
Commit
65348a89
authored
Mar 16, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SVN=112717
parent
3cdf9c3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
doc/go_lang.txt
doc/go_lang.txt
+3
-2
No files found.
doc/go_lang.txt
View file @
65348a89
...
...
@@ -368,8 +368,9 @@ A string behaves like an array of bytes, with the following properties:
- 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.
Unlike in C, there is no terminal NUL byte.
- Creation 1: a string can be created from an integer value by a conversion
string('x') yields "x"
- 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.
string('x') yields "x"; string(0x1234) yields the equivalent of "\u1234"
- Creation 2: a string can by created from an array of integer values (maybe
just array of bytes) by a conversion
a [3]byte; a[0] = 'a'; a[1] = 'b'; a[2] = 'c'; string(a) == "abc";
...
...
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