Compares two strings for equality
Format
#include <Xm/XmP.h> Boolean XmeNamesAreEqualchar *in_strchar *test_str
DESCRIPTION
XmeNamesAreEqual compares in_str to test_str and returns True if they are equivalent. Typically, in_str holds some Motif constant, such as "Xm1000TH_INCHES" and test_str holds a normalized version of a constant, such as "1000th_inches".
The case of letters in in_str is irrelevant. For comparison purposes, XmeNamesAreEqual automatically converts all letters in in_str to lowercase. By contrast, all letters in test_str must be lowercase. If any letter in test_str is uppercase, then XmeNamesAreEqual automatically returns False.
For example, if in_str contains "Goodbye" and test_str contains "goodbye", XmeNamesAreEqual returns True (because the function converts "Goodbye" to "goodbye"). However, if in_str contains "Goodbye" and test_str contains "Goodbye", XmeNamesAreEqual returns False (because of the uppercase "G" in test_str).
XmeNamesAreEqual treats the following prefixes specially: XM, Xm, xM, and xm. If one of these prefixes appears in in_str, XmeNamesAreEqual skips over it and begins the comparison at the third character in in_str. For example, if in_str contains "XMhello" and test_str contains "hello", then XmeNamesAreEqual returns True. However, XmeNamesAreEqual provides no special treatment if one of these prefixes appears in test_str. For example, if in_str contains "XMhello" and test_str contains "xmhello", then XmeNamesAreEqual returns False.
When the strings to be compared are enumerated values, then you should probably consider using the representation type facility of Motif instead of XmeNamesAreEqual. The representation type facility of Motif obeys the same string comparison rules as XmeNamesAreEqual.
XmeNamesAreEqual is used primarily by programmers writing their own resource converters.
RETURN
Returns True if the strings match. Otherwise, it returns False.
RELATED