-*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 28
+*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
- A |Job| is empty when it failed to start.
- A |Channel| is empty when it is closed.
- A |Blob| is empty when its length is zero.
- - An |Object| is empty, when the |empty()| builtin method in
- the object (if present) returns true.
+ - An |Object| is empty, when the empty() method in the object
+ (if present) returns true. |object-empty()|
For a long |List| this is much faster than comparing the
length with zero.
When {expr} is a |Blob| the number of bytes is returned.
When {expr} is a |Dictionary| the number of entries in the
|Dictionary| is returned.
- When {expr} is an |Object|, invokes the |len()| method in the
- object (if present) to get the length. Otherwise returns
- zero.
+ When {expr} is an |Object|, invokes the len() method in the
+ object (if present) to get the length (|object-len()|).
+ Otherwise returns zero.
Can also be used as a |method|: >
mylist->len()
replaced by "[...]" or "{...}". Using eval() on the result
will then fail.
- For an object, invokes the |string()| method to get a textual
+ For an object, invokes the string() method to get a textual
representation of the object. If the method is not present,
- then the default representation is used.
+ then the default representation is used. |object-string()|
Can also be used as a |method|: >
mylist->string()