diff --git a/Cargo.lock b/Cargo.lock index b97af84..c2f86e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -225,7 +225,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hexo" -version = "0.7.4" +version = "0.7.5" dependencies = [ "clap", "console", diff --git a/Cargo.toml b/Cargo.toml index 40c05fd..862c648 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hexo" -version = "0.7.4" +version = "0.7.5" edition = "2021" license = "Apache-2.0" repository = "https://github.com/lexa-diky/hexo" diff --git a/README.md b/README.md index 927e053..caeb5d9 100644 --- a/README.md +++ b/README.md @@ -79,11 +79,17 @@ Function arguments are referenced by their index: `$0`, `$1`, `$2`, ... To call a function use glyph '#' fallowed by function name and arguments: ```hexo +// String functions > #len('HelloWorld') // will emit length of 'HelloWorld' in bytes (0a) -> #pad_left(AA, 4) // will emit '00 00 00 AA' -> #pad_right(AA, 4) // will emit 'AA 00 00 00' + +// OS functions > #cmd(`ls`) // will emit result of command line 'ls' command > #read_file('file.txt') // will emit content of 'file.txt' + +// Padding functions +> #pad_left(AA, 4) // will emit '00 00 00 AA' +> #pad_right(AA, 4) // will emit 'AA 00 00 00' +> #pad('AA', left: 10x4, right: 10x8) // wil pad left by 4 bytes and right by 8 bytes ``` ### Example