Remove spaces from Source name

Replace space by underscore
This commit is contained in:
Bruno Herbelin
2021-12-25 00:41:24 +01:00
parent 0a27c14041
commit b885e70fed
3 changed files with 14 additions and 1 deletions

View File

@@ -347,7 +347,7 @@ Source::~Source()
void Source::setName (const std::string &name)
{
if (!name.empty())
name_ = BaseToolkit::transliterate(name);
name_ = BaseToolkit::unspace( BaseToolkit::transliterate(name) );
initials_[0] = std::toupper( name_.front(), std::locale("C") );
initials_[1] = std::toupper( name_.back(), std::locale("C") );