cli/scorext.cpp
int hasVisualAccidental(HTp token, int subtoken) {
	int acc = token->hasVisibleAccidental(subtoken);
	if (!acc) {
		return 0;
	}
	string tstring = token->getSubtoken(subtoken);
	if (tstring.find("--") != std::string::npos) {
		return 1;
	}
	if (tstring.find("-") != std::string::npos) {
		return 2;
	}
	if (tstring.find("##") != std::string::npos) {
		return 5;
	}
	if (tstring.find("#") != std::string::npos) {
		return 4;
	}
	return 3;
}
//////////////////////////////
//
// hasVisualAccidental -- returns true if the Humdrum **kern token has
//    a visual accidental.
//       0 = no visual accidental
//       1 = double flat
//       2 = flat
//       3 = natural
//       4 = sharp
//       5 = double sharp
//
- returns true if the Humdrum **kern token has
a visual accidental.
- returns true if the Humdrum ** kern token has a visual accidental .
int hasVisualAccidental(HTp token, int subtoken) {
	int acc = token->hasVisibleAccidental(subtoken);
	if (!acc) {
		return 0;
	}
	string tstring = token->getSubtoken(subtoken);
	if (tstring.find("--") != std::string::npos) {
		return 1;
	}
	if (tstring.find("-") != std::string::npos) {
		return 2;
	}
	if (tstring.find("##") != std::string::npos) {
		return 5;
	}
	if (tstring.find("#") != std::string::npos) {
		return 4;
	}
	return 3;
}
int hasVisualAccidental ( HTp token , int subtoken ) { int acc = token -> hasVisibleAccidental ( subtoken ) ; if ( ! acc ) { return 0 ; } string tstring = token -> getSubtoken ( subtoken ) ; if ( tstring . find ( " " ) != std :: string :: npos ) { return 1 ; } if ( tstring . find ( " " ) != std :: string :: npos ) { return 2 ; } if ( tstring . find ( " " ) != std :: string :: npos ) { return 5 ; } if ( tstring . find ( " " ) != std :: string :: npos ) { return 4 ; } return 3 ; }
hasVisualAccidental -- returns true if the Humdrum **kern token has
a visual accidental.
hasVisualAccidental -- returns true if the Humdrum ** kern token has a visual accidental .