src/Recognition.cpp
/// <summary>
/// Verifies if the recognized spoken text matches the text parameter.
/// </summary>
/// <param name="text">The text to verify.</param>
/// <returns>true if the text matches.</returns>

Verifies if the recognized spoken text matches the text parameter.

The text to verify.
true if the text matches.
Verifies if the recognized spoken text matches the text parameter . The text to verify . true if the text matches .
bool Recognition::heard(const char * text)
{
	const char* recognizedText = (const char*) this->openTextBuffer;
	if (recognizedText) {
		int length = this->length[0];
        return length > 0 && strncmp(text, recognizedText, length - (recognizedText[length - 1] == '.')) == 0;
	}
    return false;
}
bool Recognition :: heard ( const char * text ) { const char * recognizedText = ( const char * ) this -> openTextBuffer ; if ( recognizedText ) { int length = this -> length [ 0 ] ; return length > 0 && strncmp ( text , recognizedText , length - ( recognizedText [ length - 1 ] == ' ' ) ) == 0 ; } return false ; }
<summary>
Verifies if the recognized spoken text matches the text parameter.
<summary > Verifies if the recognized spoken text matches the text parameter .
//recognized open text often ends with a period - do a comparison without.