Go Built-In Functions Length and Capacity: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
=<tt>cap()</tt>=
 
* Specification https://golang.org/ref/spec#Length_and_capacity
 
=Internal=
 
* [[Go Concepts - Functions#Built-in_Functions|Built-in Functions]]
* [[Go Concepts - Lexical Structure#Pre-Declared_Identifiers|Pre-declared Identifiers]]
 
=<tt>len()</tt>=
 
<tt>[[Go Strings#Other|string]]</tt> type: string length in bytes.
 
<tt>[[Go Arrays|array]]</tt> type: the length of the array.


=<tt>cap()</tt>=
* [[Go_Slices#Slice_Capacity|Slice capacity]]

Latest revision as of 23:54, 21 August 2023