some eye-candy for Christmas! A tiny new ycp builtin named
isempty for string, list and map (in yast2-core 2.18.0). If
somebody wants it for path, term or byteblock just let me know.
Beware: 'isempty(x)' is not equal to 'size(x) == 0'. The latter
behaves different for 'x = nil' depending on the type of
x. Unfortunately size is inconsistent in that respect: depending
on the type you get '0' or 'nil' and sometimes an error message
in the logs.
isempty(nil) always return nil and logs an error (like size for
Arvin Schnell, <aschnell(a)suse.de>
Software Engineer, Research & Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-devel+help(a)opensuse.org
Show replies by date