strcmpBuffer method

int strcmpBuffer(
  1. CString str1,
  2. CString str2
)

Compares the string str1 to the string str2.

Implementation

int strcmpBuffer(CString str1, CString str2) {
  int i = 0;
  while (str1[i] != 0 && str1[i] == str2[i]) {
    i++;
  }
  return str1[i] - str2[i];
}