YaST2 Developers Documentation: yast2

yast2

modules/Map.ycp
Map manipulation routines

This module has an unstable interface.

Imports

  • String

Global Functions

global Keys (map m) -> list

Return all keys from the map

Parameters:
m the map
Return value:
a list of all keys from the map
global Values (map m) -> list

Return all values from the map

Parameters:
m the map
Return value:
a list of all values from the map
global KeysToLower (map<string, any> m) -> map

Switch map keys to lower case

Parameters:
m input map
Return value:
with keys converted to lower case
global KeysToUpper (map<string, any> m) -> map

Switch map keys to upper case

Parameters:
m input map
Return value:
with keys converted to lower case
global CheckKeys (map m, list keys) -> boolean

Check if a map contains all needed keys

Parameters:
m map to be checked
keys needed keys
Return value:
true if map kontains all keys
global ToString (map m) -> string

Convert options map $[var:val, ...] to string "var=val ..."

Parameters:
m map to be converted
Return value:
converted map
global FromString (string s) -> map

Convert string "var=val ..." to map $[val:var, ...]

Parameters:
s string to be converted
Return value:
converted string