pub const fn skip_0x(src: &[u8]) -> &[u8] ⓘExpand description
Skips the 0x or 0X prefix from a byte slice if present.
§Examples
use omp_core::hex;
let result = hex::Decoder::new(hex::skip_0x(b"0x48656c6c6f"))
.into_vec()
.unwrap();
assert_eq!(result, b"Hello");
// No prefix - returns original slice
assert_eq!(hex::skip_0x(b"48656c6c6f"), b"48656c6c6f");