int CompareStringNoCase(string,string)

(Caronte Pcode version 2.0)

Description

int this-> CompareStringNoCase( string ,string );

return Meaning
-1 string1 less than string2
0 string1 equivalent to string2
1 string1 greater than string2


Example.

Source:

CS_ANTISPAM_SCRIPT this = new CS_ANTISPAM_SCRIPT($_this);

void bubble_sort_string(string array[],int size) {
  for(int i = 0; i < size - 1; i++)
  {
   for(int j = i + 1; j < size; j++)
   {
    if(this->CompareStringNoCase(array[j],array[i]) == -1)
    {
    string v = array[i];
    array[i] = array[j];
    array[j] = v;
    }
   }
  }
}

int size = 3;
string testsort[size];

testsort[0] = "C";
testsort[1] = "B";
testsort[2] = "A";

bubble_sort_string(testsort,size);

for (int i = 0; i < size; i++)
{
   this->Print(this->Format("%d %s\n",i,testsort[i]));
}




Out:

0 A
1 B
2 C