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

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(9 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>=
 
* [[Go Arrays#Array_Length|Array length]]
 
<tt>[[Go Strings#Other|string]]</tt> type: string length in bytes.


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

Latest revision as of 23:54, 21 August 2023