YCP

YCP Builtins

SUSE Linux AG

YaST2 Team

SUSE Linux AG

Table of Contents

I. YCP Integer Builtins
tointeger - Converts a value to an integer.
II. YCP String Builtins
size - Returns the number of characters of the string s
issubstring - searches for a specific string within another string
tohexstring - Converts a integer to a hexadecimal string.
substring - Return part of a string
substring - Extract a substring
find - Return position of a substring
tolower - Make a string lowercase
toupper - Make a string uppercase
toascii - Returns characters below 0x7F included in STRING
deletechars - Removes all characters from a string
filterchars - Filter charachters out of a String
mergestring - Join list elements with a string
findfirstnotof - Search string for first non matching chars
findfirstof - Find position of first matching charachters in string
findlastof - Searches string for the last match
findlastnotof - Searches the last element of string that doesn't match
regexpmatch - Searches a string for a POSIX Extended Regular Expression match.
regexppos - Returns a pair with position and length of the first match.
regexpsub - Regex Substitution
regexptokenize - Regex tokenize
tostring - Converts a value to a string.
timestring - Return time string
crypt - Encrypt a string
cryptmd5 - Encrypt a string using md5
cryptbigcrypt - Encrypt a string using bigcrypt
cryptblowfish - Encrypt a string with blowfish
dgettext - Translates the text using the given text domain
dngettext - Translates the text using a locale-aware plural form handling
III. Map Builtins
haskey - Check if map has a certain key
filter - Filter a Map
mapmap - Maps an operation onto all key/value pairs of a map
maplist - Maps an operation onto all elements key/value and create a list
union - Union of 2 maps
add - Add a key/value pair to a map
change - Change element pair in a map
size - Size of a map
foreach - Process the content of a map
tomap - Converts a value to a map.
remove - Remove key/value pair from a map
lookup - Select a map element (deprecated)
IV. YCP List Builtins
find - Search for the first occurence of a certain element in a list
prepend - Prepend a list with a new element
contains - Check if a list contains an element
setcontains - Check if a sorted list contains an element
union - Union of lists
merge - Merge two lists into one
filter - Filter a List
maplist - Maps an operation onto all elements of a list and thus creates a new list.
listmap - Maps an operation onto all elements of a list and thus creates a map.
flatten - Flatten List
toset - Sort list and remove duplicates
sort - Sort a List according to the YCP builtin predicate
sort - Sort list using an expression
lsort - Sort A List respecting locale
splitstring - Split a string by delimiter
change - Change a list
add - Create a new list with a new element
size - Return size of list
remove - Remove element from a list
select - Selet a list element (deprecated)
foreach - Process the content of a list
tolist - Converts a value to a list (deprecated).
V. YCP Path Builtins
size - Returns the number of path elements
add - Add a path element to existing path
topath - Converts a value to a path.
VI. YCP Term Builtins
size - Returns the number of arguments of the term TERM.
add - Add value to term
symbolof - Returns the symbol of the term TERM.
select - Select item from term
toterm - Converts a value to a term.
remove - Remove item from term
argsof - Returns the arguments of a term.
VII. Miscellaneous YCP Builtins
time - Return the number of seconds since 1.1.1970.
sleep - Sleeps a number of milliseconds.
random - Random number generator.
srandom - Initialize random number generator
srandom - Initialize random number generator.
eval - Evaluate a YCP value.
sformat - Format a String
y2debug - Log a message to the y2log.
y2milestone - Log a milestone to the y2log.
y2warning - Log a warning to the y2log.
y2error - Log an error to the y2log.
y2security - Log a security message to the y2log.
y2internal - Log an internal message to the y2log.
VIII. YCP Float Builtins
tostring - Converts a floating point number to a string
tofloat - Converts a value to a floating point number.
IX. YCP Byteblock Builtins
tobyteblock - Converts a value to a byteblock.
size - Returns a size of a byteblock in bytes.