deps/kb_meme/meme-5.0.1/src/alph-in.c
/*
 * add_encoding
 * Adds a letter to an encoding array. If the alphabet is is specified in
 * all upper case or all lower case then we accept the opposite case letters,
 * this does not effect numbers or punctuation symbols.
 */
add_encoding
Adds a letter to an encoding array. If the alphabet is is specified in
all upper case or all lower case then we accept the opposite case letters,
this does not effect numbers or punctuation symbols.
add_encoding Adds a letter to an encoding array . If the alphabet is is specified in all upper case or all lower case then we accept the opposite case letters this does not effect numbers or punctuation symbols .
static inline void add_encoding(uint8_t* encode, bool both_case, char symbol, uint8_t index) {
  encode[(uint8_t)symbol] = index;
  if (both_case) {
    if (symbol >= 'A' && symbol <= 'Z') { 
      encode[(uint8_t)symbol + 32] = index;
    } else if (symbol >= 'a' && symbol <= 'z') { 
      encode[(uint8_t)symbol - 32] = index;
    } 
  }
}
static inline void add_encoding ( uint8_t * encode , bool both_case , char symbol , uint8_t index ) { encode [ ( uint8_t ) symbol ] = index ; if ( both_case ) { if ( symbol >= ' ' && symbol <= ' ' ) { encode [ ( uint8_t ) symbol + 32 ] = index ; } else if ( symbol >= ' ' && symbol <= ' ' ) { encode [ ( uint8_t ) symbol - 32 ] = index ; } } }
add_encoding
 Adds a letter to an encoding array.
add_encoding Adds a letter to an encoding array .
// convert to lower case // convert to upper case // else not alphabetic and hence no other case option