kkbt

Crates.iokkbt
lib.rskkbt
version0.1.3
sourcesrc
created_at2022-04-19 00:26:04.72313
updated_at2022-12-26 03:57:07.165286
descriptionA minilib.
homepage
repositoryhttps://gitee.com/kkbt/rust-kkbt
max_upload_size
id570095
size10,005
恐咖兵糖 (kkbt0)

documentation

README

恐咖兵糖的常用工具库。

MiniLib

小型工具库,恐咖兵糖常用工具的集合
Common Tools for 恐咖兵糖
Gitee https://gitee.com/kkbt/rust-kkbt
函数:

  • show_file_hex(path:&str);

  • Shabby KV

Maybe it can use for config file.

use kkbt::SKV;
fn main() {
    // SKV::init("data/index", "data/data").unwrap();

    let skv = SKV::config("data/index", "data/data");

    skv.set("kkbt", Vec::from("我是恐咖兵糖1".as_bytes()));
    skv.set("kkbt", Vec::from("".as_bytes()));
    assert_eq!(skv.get_utf8("kkbt"),None);

    skv.set("kkbt", Vec::from("我是恐咖兵糖3".as_bytes()));
    assert_eq!(skv.get_utf8("kkbt"),Some("我是恐咖兵糖3".to_string()));

    assert_eq!(skv.get_utf8("abcdefg"),None);

   // kkbt::show_file_hex("data/index", 3).unwrap();
}


Commit count: 0

cargo fmt