1 | | = Built-In Functions = |
| 1 | == Built-In Functions == |
| 2 | [[TracNav]] |
| 3 | |
| 4 | ==== base64 decode( arg:string ) : string ==== |
| 5 | |
| 6 | This function decodes the given string that must be Base64 (defined in RFC 2045) encoded. |
| 7 | |
| 8 | "/test" = "[" + base64_decode("aGVsbG8gd29ybGQ=") + "]"; |
| 9 | # will be the string "[hello world]" |
| 10 | |
| 11 | clone( arg:element ) : element |
| 12 | |
| 13 | This function returns a clone (copy) of the given argument. |
| 14 | |
| 15 | create( name:string, . . . ) : nlist |
| 16 | |
| 17 | This function returns the named list which is the result of the execution of the structure template identified |
| 18 | by the given name; the optional extra parameters must be pairs of key and value and will add or modify |
| 19 | the result accordingly (a bit like with nlist). |
| 20 | |
| 21 | # description of a CD mount entry (but the device is unknown) |
| 22 | structure template mount_cdrom; |
| 23 | "device" = undef; |
| 24 | "path" = "/mnt/cdrom"; |
| 25 | "type" = "iso9660"; |
| 26 | "options" = list("noauto", "owner", "ro"); |
| 27 | # our first mount entry is the CD coming from hdc |
| 28 | |