fixes & enhandcements

(benchmark code..) implemented
repl completion very first version
(string xx) added
some builtin renames
a bit of comments
a bit of cocumentation
(sleep interval) added
This commit is contained in:
2021-03-14 16:15:04 +01:00
parent 8fad428a4b
commit c4e4522492
12 changed files with 276 additions and 110 deletions

View File

@@ -64,19 +64,26 @@
|`(parse-json json_string)`|Parse JSON string||
|`(save-csv ..)`|||
|`(get-universal-time)`|Get current time as secs from epoch||
|`(date-to-str ..)`|||
|`(str-to-date ..)`|||
|`(date-add ..)`|||
|`(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"`|
|`(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"`|
|`(debug ..)`|||
|`(display ..)`|||
|`(replace ..)`|||
|`(regex-search? ..)`|||
|`(string-replace source substr replacement)`|Replace a substring with a replacement string in a source string|`>>> (string-replace "abcdefg" "de" "DE") => "abcDEfg"`|
|`(string-regex? where regex)`| Returns true if where contains regex|`>>> (string-regex? "aba123cdefg" "[0-9]+") => 1`|
|`(string-pad str len char rpad_lpad)`|||
|`(int ..)`|||
|`(float ..)`|||
|`(int value)`|Cast an item to an int|`>>> (int 3.41) => 3`|
|`(float value)`|Cast item to a float|`>>> (int 3.41) => 3.14`|
|`(string value)`|Cast int or float item to a string|`>>> (string 3.14) => "3.14"`|
|`(eval ..)`|||
|`(type ..)`|||
|`(parse ..)`|||
|`(make-list size)`|||
|`(make-list-of size value)`|||
|`(make-list-of size value)`|Makes list with size elements of values||
|`(make-list size)`|Makes list of nil values with size length||
|`(uniq list)`|||
|`(flatten list)`|||
|`(benchmark msg_string code..)`|Benchmarks a block of expressions|Returns value od benchmarked code|
|`(xx ..)`|||