Logo Search packages:      
Sourcecode: kanagram version File versions  Download package

QString Kanagram::stripAccents ( const QString &  original ) [private]

strip accents from given string

Parameters:
originalstring to strip accents from
Returns:
string without accents

Definition at line 809 of file kanagram.cpp.

Referenced by checkWord().

{
    QString noAccents;
    QString decomposed = original.normalized(QString::NormalizationForm_D);
    for (int i = 0; i < decomposed.length(); ++i) {
        if ( decomposed[i].category() != QChar::Mark_NonSpacing ) {
            noAccents.append(decomposed[i]);
        }
    }
    return noAccents;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index