bit_utils

String and quoting utilities (gix-utils + gix-quote equivalent)

git
utils
quote
moon add mizchi/bit_utils@0.46.4
Download zip
Author
Version
0.46.4
License
Apache-2.0
Last updated
4 days ago
Downloads
503
README

#
decode_bytes

fn decode_bytes(data : Bytes) -> String

Decode bytes to string using UTF-8 lossy decoding.

#
mode_to_string

fn mode_to_string(mode : Int) -> String

Convert a file mode integer to its canonical string (e.g. 33188 → "100644").

#
to_octal_string

fn to_octal_string(value : Int) -> String

Convert an integer mode to its octal string representation.

#
trim_string

fn trim_string(s : String) -> String

Trim whitespace (space, tab, newline, carriage return) from both ends.

Source Files