regex_syntax::hir::literal

Function rank

source
pub fn rank(byte: u8) -> u8
Expand description

Returns the “rank” of the given byte.

The minimum rank value is 0 and the maximum rank value is 255.

The rank of a byte is derived from a heuristic background distribution of relative frequencies of bytes. The heuristic says that lower the rank of a byte, the less likely that byte is to appear in any arbitrary haystack.