Skip to main content

encode_char

Function encode_char 

Source
pub fn encode_char(ch: char) -> Option<u8>
Expand description

Encode a single IUPAC nucleotide character to its alphabet index.

U/u is treated as T (RNA → DNA). Gap characters - and . return None. Non-ASCII characters always return None. Prefer encode_byte when the input is already &[u8] to avoid the char conversion.