iceyee_convert

Crates.ioiceyee_convert
lib.rsiceyee_convert
version1.0.3
sourcesrc
created_at2022-11-09 03:29:44.375156
updated_at2023-10-29 14:56:14.361618
description类型转换, Conversion, 已被弃用, 参考iceyee_encoder.
homepage
repositoryhttps://github.com/iceyee/rust_iceyee/tree/main/iceyee_convert/
max_upload_size
id708512
size5,322
Iceyee (iceyee)

documentation

README

iceyee_convert

转换类型.

  • string_to_hex

Supported Os

  • linux
  • macos
  • windows

Example

#[test]
pub fn test_string_to_hex() {
    use iceyee_convert::Conversion;
    println!("");
    assert!(Conversion::string_to_hex("FFF").unwrap() == 0xFFF);
    assert!(Conversion::string_to_hex("1af").unwrap() == 0x1AF);
    assert!(Conversion::string_to_hex("FFFG").is_err());
    assert!(Conversion::string_to_hex(" Z").is_err());
    return;
}
Commit count: 0

cargo fmt