void encodeTail(std::string& encoding, const std::string& word) const {
     for (auto i = 1u; i < word.length(); i++) {
         if (!isComplete(encoding)) {
             encodeLetter(encoding, word[i], word[i - 1]);
         }
     }
 }
コード例 #2
0
ファイル: Soundex.cpp プロジェクト: pablobcb/tdd
std::string Soundex::encodeTail( const std::string& word ) const
{
    std::string encoding = "";

    for ( size_t i = 0 ; i < word.size() ; i++ )
    {
        if ( isComplete( encoding ) )
            break;
        encodeLetter( encoding, word[ i ], word[ i - 1]);
    }

    return encoding;
}
コード例 #3
0
ファイル: Soundex.cpp プロジェクト: eDyablo/jorney
void Soundex::encodeTail(std::string& encoding, const std::string& word) const {
	for (auto i = 1u; i < word.length(); ++i) {
		if (!isComplete(encoding))
			encodeLetter(encoding, word[i], word[i - 1]);
	}
}