deps/kb_meme/meme-5.0.1/src/meme2images.c
/**************************************************************************
 * Copy the name while replacing non-alphanumeric characters
 **************************************************************************/
Copy the name while replacing non-alphanumeric characters
Copy the name while replacing non - alphanumeric characters
void copy_and_sanatise_name(char *target, char *source, int max_len) {
  int i;
  i = 0;
  while (i < max_len && source[i] != '\0') {
    if ((source[i] >= 'a' && source[i] <= 'z') || 
        (source[i] >= 'A' && source[i] <= 'Z') || 
        (source[i] >= '0' && source[i] <= '9') ||
        source[i] == '_') {
      target[i] = source[i];
    } else {
      target[i] = '_';
    }
    ++i;
  }
  if (i < max_len) {
    target[i] = '\0';
  }
}
void copy_and_sanatise_name ( char * target , char * source , int max_len ) { int i ; i = 0 ; while ( i < max_len && source [ i ] != ' \0 ' ) { if ( ( source [ i ] >= ' ' && source [ i ] <= ' ' ) || ( source [ i ] >= ' ' && source [ i ] <= ' ' ) || ( source [ i ] >= ' ' && source [ i ] <= ' ' ) || source [ i ] == ' ' ) { target [ i ] = source [ i ] ; } else { target [ i ] = ' ' ; } ++ i ; } if ( i < max_len ) { target [ i ] = ' \0 ' ; } }
Copy the name while replacing non-alphanumeric characters
Copy the name while replacing non - alphanumeric characters