Nvim :help
pages, generated
from source
using the tree-sitter-vimdoc parser.
{msgpack-value}
Either msgpack-special-dict or a regular value, but
not function reference.
{msgpack-integer}
Any value for which msgpack#type() will return
"integer".
{msgpack-special-int}
msgpack-special-dict representing integer.{msgpack-value}
) msgpack#is_int()
Returns 1 if given {msgpack-value}
is integer value, 0 otherwise.{msgpack-value}
) msgpack#is_uint()
Returns 1 if given {msgpack-value}
is integer value greater or equal
to zero, 0 otherwise.msgpack#strftime
msgpack#strftime({format}
, {msgpack-integer}
) msgpack#strftime()
Same as strftime(), but second argument may be
msgpack-special-dict. Requires Python to really work with
msgpack-special-dicts.msgpack#strptime
msgpack#strptime({format}
, {time}
) msgpack#strptime()
Reverse of msgpack#strftime(): for any time and format
msgpack#equal( msgpack#strptime(format, msgpack#strftime(format,
time)), time) be true. Requires ||Python|, without it only supports
non-|msgpack-special-dict| nonnegative times and format equal to
%Y-%m-%dT%H:%M:%S
.{msgpack-special-int}
) msgpack#int_dict_to_str()
Function which converts msgpack-special-dict integer value to
a hexadecimal value like 0x1234567890ABCDEF (always returns exactly 16
hexadecimal digits).{msgpack-value}
) msgpack#special_type()
Returns zero if {msgpack-value}
is not msgpack-special-dict. If it
is it returns name of the key in v:msgpack_types which represents
{msgpack-value}
type.{msgpack-value}
) msgpack#type()
Returns name of the key in v:msgpack_types that represents
{msgpack-value}
type. Never returns zero: this function returns
msgpack type which will be dumped by msgpackdump() should it receive
a list with single {msgpack-value}
as input.{msgpack-value}
) msgpack#deepcopy()
Like deepcopy(), but works correctly with msgpack-special-dict
values. Plain deepcopy() will destroy all types in
msgpack-special-dict values because it will copy _TYPE key values,
while they should be preserved.{msgpack-value}
) msgpack#string()
Like string(), but saves information about msgpack types. Values
dumped by msgpack#string may be read back by msgpack#eval().
Returns is the following:"abc"
: binary string.
2. ="abc"
: string.
3. +(10)"ext"
: extension strings (10 may be replaced with any
8-bit signed integer).
Inside strings the following escape sequences may be present: "\0"
(represents NUL byte), "\n" (represents line feed) and "\""
(represents double quote).
{string}
, {dict}
) msgpack#eval()
Transforms string created by msgpack#string() into a value suitable
for msgpackdump(). Second argument allows adding special values
that start with head characters (/\h) and contain only word
characters (/\w). Built-in special values are "TRUE", "FALSE",
"NIL", "nan" and "inf" and they cannot be overridden. Map values are
always evaluated to msgpack-special-dict values, as well as
hexadecimal digits. When evaluating maps order of keys is preserved.'/'
(equivalent to
char2nr('/')
: 47
). This also allows '\0'
(number is decimal).msgpack#equal
msgpack#equal({msgpack-value}
, {msgpack-value}
) msgpack#equal()
Returns 1 if given values are equal, 0 otherwise. When comparing
msgpack map values order of keys is ignored. Comparing
msgpack-special-dict with equivalent non-special-dict value
evaluates to 1.