size

get size/length of given collection


Parameters

size collection :null :string :dictionary :object :block :range

Returns

  • :integer
  • :floating

Examples

copy
arr: ["one" "two" "three"] print size arr ; 3

copy
dict: #[name: "John", surname: "Doe"] print size dict ; 2

copy
str: "some text" print size str ; 9 print size "你好!" ; 3

Related