#conversion #convert #iceyee #test #string-to-hex #已被弃用 #转换类型

iceyee_convert

类型转换, Conversion, 已被弃用, 参考iceyee_encoder

4 stable releases

1.0.3 Oct 29, 2023
1.0.2 Nov 11, 2022
1.0.1 Nov 10, 2022
1.0.0 Nov 9, 2022

#8 in #iceyee

Apache-2.0

5KB
59 lines

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;
}

lib.rs:

转换类型.

No runtime deps