|
1 |
| -*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 23 |
| 1 | +*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 29 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -2265,8 +2265,8 @@ empty({expr}) *empty()*
|
2265 | 2265 | - A |Job| is empty when it failed to start.
|
2266 | 2266 | - A |Channel| is empty when it is closed.
|
2267 | 2267 | - A |Blob| is empty when its length is zero.
|
2268 |
| - - An |Object| is empty, when the |empty()| builtin method in |
2269 |
| - the object (if present) returns true. |
| 2268 | + - An |Object| is empty, when the empty() method in the object |
| 2269 | + (if present) returns true. |object-empty()| |
2270 | 2270 |
|
2271 | 2271 | For a long |List| this is much faster than comparing the
|
2272 | 2272 | length with zero.
|
@@ -5485,9 +5485,9 @@ len({expr}) The result is a Number, which is the length of the argument.
|
5485 | 5485 | When {expr} is a |Blob| the number of bytes is returned.
|
5486 | 5486 | When {expr} is a |Dictionary| the number of entries in the
|
5487 | 5487 | |Dictionary| is returned.
|
5488 |
| - When {expr} is an |Object|, invokes the |len()| method in the |
5489 |
| - object (if present) to get the length. Otherwise returns |
5490 |
| - zero. |
| 5488 | + When {expr} is an |Object|, invokes the len() method in the |
| 5489 | + object (if present) to get the length (|object-len()|). |
| 5490 | + Otherwise returns zero. |
5491 | 5491 |
|
5492 | 5492 | Can also be used as a |method|: >
|
5493 | 5493 | mylist->len()
|
@@ -9598,14 +9598,16 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
|
9598 | 9598 | Dictionary {key: value, key: value}
|
9599 | 9599 | Class class SomeName
|
9600 | 9600 | Object object of SomeName {lnum: 1, col: 3}
|
| 9601 | + Enum enum EnumName |
| 9602 | + EnumValue enum name.value {name: str, ordinal: nr} |
9601 | 9603 |
|
9602 | 9604 | When a |List| or |Dictionary| has a recursive reference it is
|
9603 | 9605 | replaced by "[...]" or "{...}". Using eval() on the result
|
9604 | 9606 | will then fail.
|
9605 | 9607 |
|
9606 |
| - For an object, invokes the |string()| method to get a textual |
| 9608 | + For an object, invokes the string() method to get a textual |
9607 | 9609 | representation of the object. If the method is not present,
|
9608 |
| - then the default representation is used. |
| 9610 | + then the default representation is used. |object-string()| |
9609 | 9611 |
|
9610 | 9612 | Can also be used as a |method|: >
|
9611 | 9613 | mylist->string()
|
@@ -10461,6 +10463,8 @@ type({expr}) The result is a Number representing the type of {expr}.
|
10461 | 10463 | Class: 12 |v:t_class|
|
10462 | 10464 | Object: 13 |v:t_object|
|
10463 | 10465 | Typealias: 14 |v:t_typealias|
|
| 10466 | + Enum: 15 |v:t_enum| |
| 10467 | + EnumValue: 16 |v:t_enumvalue| |
10464 | 10468 | For backward compatibility, this method can be used: >
|
10465 | 10469 | :if type(myvar) == type(0)
|
10466 | 10470 | :if type(myvar) == type("")
|
|
0 commit comments