void setFilter(char* expression);

Function setFilter() filters records by some condition.
The function does not change a file, it filters records in a memory.
To return the original state of a table - call unsetFilter().
By default case of letters is ignored. You can change the default behaviour with function caseSensitiveMode().
You can use the following operators in the expression:

Operation Meaning Example
<LessFIELD1<123
>MoreFIELD1>123
=Equal for numbers, begin with for stringsFIELD1=123
FIELD2=john
==Equal for numbers, exact equal for stringsFIELD2==john
FIELD2==john lennon
<>Do not equalFIELD1<>123
<=Less or equalFIELD1<=123
>=More or equalFIELD1>=123
~Contain a substringFIELD2~lennon
^Do not contain a substringFIELD1^lennon

You can use & and | to unite expressions

void unsetFilter();
void caseSensitiveMode(BOOL sensitive);


{
    // your code
    dbf->setFilter("FIRSTNAME=john");
    printf( "Reccount = %ld\n", dbf->recCount() );
    dbf->caseSensitiveMode(TRUE);
    dbf->setFilter("FIRSTNAME=john");
    printf( "Reccount = %ld\n", dbf->recCount() );
    // your code
    dbf->unsetFilter();
}