Skip to main content

get_hash_prefix

Function get_hash_prefix 

Source
pub fn get_hash_prefix(hash: &str, prefix_len: usize) -> String
Expand description

Get a prefix of the specified length from a hash.

§Arguments

  • hash - The full hash as a hex string
  • prefix_len - The number of hex characters to include in the prefix

§Returns

The prefix as a hex string