Function parse_bencode_num

Source
pub fn parse_bencode_num(input: &[u8]) -> IResult<&[u8], &[u8]>
Expand description

Parse out a bencode integer, conforming to bencode specification, leading 0s and negative 0 are rejected. Since the bencode specification places no limit on the range of the integers, the function will only give out string slices and leave the conversion choice to the user.`

§Note

Although the functions are exposed directly, it’s unsuitable to be used directly in most cases, it’s provided for quick and dirty convenience only.