ATLAS Offline Software
Loading...
Searching...
No Matches
compare-string.h File Reference

Comparison functions for strings. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int string_equal (void *string1, void *string2)
 Compare two strings to determine if they are equal.
int string_compare (void *string1, void *string2)
 Compare two strings.
int string_nocase_equal (void *string1, void *string2)
 Compare two strings to determine if they are equal, ignoring the case of letters.
int string_nocase_compare (void *string1, void *string2)
 Compare two strings, ignoring the case of letters.

Detailed Description

Comparison functions for strings.

To find the difference between two strings, use string_compare.

To find if two strings are equal, use string_equal.

For case insensitive versions, see string_nocase_compare and string_nocase_equal.

Definition in file compare-string.h.

Function Documentation

◆ string_compare()

int string_compare ( void * string1,
void * string2 )

Compare two strings.

Parameters
string1The first string.
string2The second string.
Returns
A negative value if the first string should be sorted before the second, a positive value if the first string should be sorted after the second, zero if the two strings are equal.

◆ string_equal()

int string_equal ( void * string1,
void * string2 )

Compare two strings to determine if they are equal.

Parameters
string1The first string.
string2The second string.
Returns
Non-zero if the strings are equal, zero if they are not equal.

◆ string_nocase_compare()

int string_nocase_compare ( void * string1,
void * string2 )

Compare two strings, ignoring the case of letters.

Parameters
string1The first string.
string2The second string.
Returns
A negative value if the first string should be sorted before the second, a positive value if the first string should be sorted after the second, zero if the two strings are equal.

◆ string_nocase_equal()

int string_nocase_equal ( void * string1,
void * string2 )

Compare two strings to determine if they are equal, ignoring the case of letters.

Parameters
string1The first string.
string2The second string.
Returns
Non-zero if the strings are equal, zero if they are not equal.