08-05-2008 06:01 PM
08-06-2008 12:25 AM
Using ANSI C something like the following should do the trick ( remember: last character of a string is string[strlen(string )-1])
success = 1;
for (i = 0, (i <strlen(Message2)) && success; i--)
success = Message2[strlen(Message2) -1-i] == Message1[strlen(Message1) -1-i]
If you prefer to use the NIs libraries you could use CompareStrings with an offset.
CompareStrings( Message1,StringLength (Message1)-StringLength (Message2),Message2,0,1) == 0;
08-10-2008 11:16 PM
try the simple CVI function:
FindPattern() in Formatting and IO library /string manipulation:
found_at_pos = FindPattern (buffer_to_seach, start_index, num_of_bytes, "pattern_to_find", case_sensitive, start_at_end);
layosh