Go Built-In Functions Length and Capacity: Difference between revisions
Jump to navigation
Jump to search
(→len()) |
(→len()) |
||
Line 10: | Line 10: | ||
=<tt>len()</tt>= | =<tt>len()</tt>= | ||
<tt>[[Go Strings|string]]</tt> type: string length in bytes. | <tt>[[Go Strings|string#Other]]</tt> type: string length in bytes. | ||
<tt>[[Go Arrays|array]]</tt> type: the length of the array. | <tt>[[Go Arrays|array]]</tt> type: the length of the array. | ||
=<tt>cap()</tt>= | =<tt>cap()</tt>= |
Revision as of 22:35, 27 March 2016
External
- Specification https://golang.org/ref/spec#Length_and_capacity
Internal
len()
string#Other type: string length in bytes.
array type: the length of the array.