Next: , Previous: Autostr searching, Up: Automatic strings


10.9 Comparing automatic strings

— Function: int astr_null (const Autostr *astr)

Returns non-zero iff astr is empty.

— Function: int astr_equal (const Autostr *a, const Autostr *b)
— Function: int astr_equal_s (const Autostr *a, const char *b)

Returns non-zero iff the strings a and b are equal.

— Function: int astr_iequal (const Autostr *a, const Autostr *b)
— Function: int astr_iequal_s (const Autostr *a, const char *b)

Returns non-zero iff the strings a and b are equal except for differences in case of letters. Currently, the upper/lower case properties of high-bit characters are undefined; this will change in a future library release.

— Function: int astr_cmp (const Autostr *a, const Autostr *b)
— Function: int astr_cmp_s (const Autostr *a, const char *b)

Returns zero if the strings a and b are equal, a negative value if a is less than b, or a positive value if a is greater than b. The ordering is defined in the same way as it is for the standard C library function ‘strcmp’.

— Function: int astr_icmp (const Autostr *a, const Autostr *b)
— Function: int astr_icmp_s (const Autostr *a, const char *b)

Behaves as ‘astr_cmp’, except that case differences are ignored. Currently, the upper/lower case properties of high-bit characters are undefined; this will change in a future library release.