Function encode

Source
pub fn encode(buf: &[u8], base: u8) -> Vec<u8> 
Expand description

Encodes a u8 slice to any base.

The base must be at least 2 and lower or equal than 256.

The return value contains the digits in the specified base.