doc updates

This commit is contained in:
VaclavT 2021-05-20 11:24:46 +02:00
parent 08131d3e4e
commit 75a6e186a6
1 changed files with 8 additions and 8 deletions

View File

@ -19,12 +19,12 @@
## Library ## Library
|Signature|Description|Return values| |Signature|Description|Return values|
|:-|-|-| |:-|-|-|
|`(= a b)`|Test whether two values are equal|`1` when equal otherwise `0`| |`(= a b)`|Test whether two values are equal|`1` when equal otherwise `nil`|
|`(!= a b)`|Test whether two values are not equal|`1` when not equal otherwise `0`| |`(!= a b)`|Test whether two values are not equal|`1` when not equal otherwise `nil`|
|`(> a b)`|Test whether one value is greater to another |`1` when greater otherwise `0`| |`(> a b)`|Test whether one value is greater to another |`1` when greater otherwise `nil`|
|`(< a b)`|Test whether one value is less to another |`1` when less otherwise `0`| |`(< a b)`|Test whether one value is less to another |`1` when less otherwise `nil`|
|`(>= a b)`|Test whether one value is greater or equal to another |`1` when greater or equal otherwise `0`| |`(>= a b)`|Test whether one value is greater or equal to another |`1` when greater or equal otherwise `nil`|
|`(<= a b)`|Test whether one value is less or equal to another |`1` when less or equal otherwise `0`| |`(<= a b)`|Test whether one value is less or equal to another |`1` when less or equal otherwise `nil`|
|`(+ a b ..)`|Sum multiple values |sum of values| |`(+ a b ..)`|Sum multiple values |sum of values|
|`(- a b)`|Substract two values |result of substraction| |`(- a b)`|Substract two values |result of substraction|
|`(* a b ..)`|Multiply several values|result of multiplication| |`(* a b ..)`|Multiply several values|result of multiplication|
@ -57,7 +57,7 @@
|`(include file)`|Read a file and execute its code|| |`(include file)`|Read a file and execute its code||
|`(read-file filename)`|Get the contents of a file|| |`(read-file filename)`|Get the contents of a file||
|`(write-file filename)`|Write a string to a file|| |`(write-file filename)`|Write a string to a file||
|`(read-url url [headers])`|Reads URL|Returns list (status_code content)| |`(read-url url [headers])`|Reads URL|Returns list (status-code content)|
|`(system-cmd command_str)`|Execute system command|| |`(system-cmd command_str)`|Execute system command||
|`(ls-dir ..)`|List a dir|List of directory entries| |`(ls-dir ..)`|List a dir|List of directory entries|
|`(is-file? ..)`|Returns true if passed filename is a file|| |`(is-file? ..)`|Returns true if passed filename is a file||
@ -69,7 +69,7 @@
|`(date-to-str date format)`|Converts date to formated string. Format is strftime format (https://www.tutorialspoint.com/c_standard_library/c_function_strftime.htm)|`>>> (date-to-str (get-universal-time) "%Y-%m-%d %H:%M:%S") |`(date-to-str date format)`|Converts date to formated string. Format is strftime format (https://www.tutorialspoint.com/c_standard_library/c_function_strftime.htm)|`>>> (date-to-str (get-universal-time) "%Y-%m-%d %H:%M:%S")
=> "2021-03-13 19:53:01"`| => "2021-03-13 19:53:01"`|
|`(str-to-date string format)`|Converst string to time of secs since epoch. |`>>> (str-to-date "2021-03-13 19:53:01" "%Y-%m-%d %H:%M:%S") => 1615665181`| |`(str-to-date string format)`|Converst string to time of secs since epoch. |`>>> (str-to-date "2021-03-13 19:53:01" "%Y-%m-%d %H:%M:%S") => 1615665181`|
|`(date-add ..)`|Add number of units to date. A unit is one of 'year', 'month', 'day', 'hour', 'minute' or 'second'|`>>> (date-to-str (date-add (str-to-date "2021-03-13 19:53:01" "%Y-%m-%d %H:%M:%S") 10 "day") "%Y-%m-%d %H:%M:%S") => "2021-03-23 20:53:01"`| |`(date-add date amount unit)`|Add number of units to date. A unit is one of 'year', 'month', 'day', 'hour', 'minute' or 'second'|`>>> (date-to-str (date-add (str-to-date "2021-03-13 19:53:01" "%Y-%m-%d %H:%M:%S") 10 "day") "%Y-%m-%d %H:%M:%S") => "2021-03-23 20:53:01"`|
|`(debug ..)`||| |`(debug ..)`|||
|`(display ..)`||| |`(display ..)`|||
|`(string-replace source substr replacement)`|Replace a substring with a replacement string in a source string|`>>> (string-replace "abcdefg" "de" "DE") => "abcDEfg"`| |`(string-replace source substr replacement)`|Replace a substring with a replacement string in a source string|`>>> (string-replace "abcdefg" "de" "DE") => "abcDEfg"`|