libexplain  1.4.D001
Functions
libexplain/fstrcmp.h File Reference

Go to the source code of this file.

Functions

double explain_fstrcmp (const char *s1, const char *s2)
double explain_fstrcasecmp (const char *s1, const char *s2)

Function Documentation

double explain_fstrcasecmp ( const char *  s1,
const char *  s2 
)

The explain_fstrcasecmp function may be used to compare two strings. The comparison is case insensitive. The order of the strings has no effect on the result.

Parameters:
s1The first string to be compared.
s2The second string to be compared.
Returns:
Rather than a simple yes/no result, the similarity of the strings is returned. A return of 0.0 means the strings are completely differemt, and a return value of 1.0 means they are identical. However, values can be returned between these two values, indicating the degree of similarity.
Note:
This function uses dynamic memory. May return -1 if malloc fails.

Definition at line 424 of file fstrcmp.c.

double explain_fstrcmp ( const char *  s1,
const char *  s2 
)

The explain_fstrcmp function may be used to compare two strings. The order of the strings has no effect on the result.

Parameters:
s1The first string to be compared.
s2The second string to be compared.
Returns:
Rather than a simple yes/no result, the similarity of the strings is returned. A return of 0.0 means the strings are completely differemt, and a return value of 1.0 means they are identical. However, values can be returned between these two values, indicating the degree of similarity.
Note:
This function uses dynamic memory. May return -1 if malloc fails. This function is not thread-safe.

Definition at line 289 of file fstrcmp.c.