astChrMatchNastChrMatchN - Case insensitive string comparison of at most N characters

Description:
This function compares two null terminated strings for equality, discounting differences in case and any trailing white space in either string. No more than "n" characters are compared.
Synopsis:
int astChrMatchN( const char $*$str1, const char $*$str2, size_t n )
Parameters:
str1
Pointer to the first string.
str2
Pointer to the second string.
n
Maximum number of characters to compare.
Returned Value:
astChrMatchN()
Non-zero if the two strings match, otherwise zero.
Notes:
  • A value of zero is returned if this function is invoked with the global error status set or if it should fail for any reason.