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]));
}
|