Function : Item (Field)

NSFItemTextEqual - Test if item text is equal to a given text string.
----------------------------------------------------------------------------------------------------------

#include <nsfnote.h>

BOOL LNPUBLIC NSFItemTextEqual(
NOTEHANDLE note_handle,
const char far *item_name,
const char far *item_text,
WORD text_len,
BOOL case_sensitive_flag
);

Description :

This function takes a handle to an open note, the name for the TYPE_TEXT Item whose value you wish to test, the test text, the length of that text, and a boolean value indicating whether or not to ignore case during the comparison.. It returns TRUE if the text is equal or FALSE if it is not.

Parameters :

Sample Usage :

/* Compare text to text item ignoring case! */

printf("Does %s: %s\nEqual %s: %s if case is ignored ?\n",
          TEXT_ITEM, text_buf1,
          TEXT_ITEM, SOME_TEXT3);
printf("Answer: %s\n", (NSFItemTextEqual(note1_handle, TEXT_ITEM,
                             SOME_TEXT3, strlen(SOME_TEXT3),FALSE))
                             ? "YES YES YES!" : "Nooooooooo!");


See Also :

NSFItemLongCompare
----------------------------------------------------------------------------------------------------------