英文文档:
len(s)
Return the length (the number of items) of an object. The argument may be a sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).
返回对象的长度
说明:
1. 返回对象的长度,参数可以是序列(比如
:clockwise_vertical_arrows: github.com/elliotchance/orderedmap
安装
go get -u github.com/elliotchance/orderedmap
基本用法
*OrderedMap是一种高性能的有序地图,它为Set , Get , Delete和Len维护摊销的O(1):
m := orderedmap . NewOrderedMap ()
m . Set ( "foo" , "bar" )
m . Set ( "qux