This commit is contained in:
Houston4444 2025-12-01 21:37:18 +02:00 committed by GitHub
commit 44465bd751
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -119,19 +119,19 @@ short_version (string orig, string::size_type target_length)
orig.replace (pos, 1, "");
}
/* remove upper-case vowels, starting at end */
/* remove lower-case consonants, starting at end */
while (orig.length() > target_length) {
if ((pos = orig.find_last_of (_("AEIOU"))) == string::npos) {
if ((pos = orig.find_last_of (_("bcdfghjklmnpqrtvwxyz"))) == string::npos) {
break;
}
orig.replace (pos, 1, "");
}
/* remove lower-case consonants, starting at end */
/* remove upper-case vowels, starting at end */
while (orig.length() > target_length) {
if ((pos = orig.find_last_of (_("bcdfghjklmnpqrtvwxyz"))) == string::npos) {
if ((pos = orig.find_last_of (_("AEIOU"))) == string::npos) {
break;
}
orig.replace (pos, 1, "");