this-> Trim
this-> TrimLeft
this-> TrimRight
this-> TrimInternal

(Caronte Pcode version 2.0)

Trim --  Strip whitespace from the beginning and end of a string
TrimLeft --  Strip whitespace from the beginning
TrimRight --  Strip whitespace from the end
TrimInternal -- Strip whitespace from internal string

Description

string this-> Trim[Left Rigth Internal] ( string);


Example.

Source:

CS_ANTISPAM_SCRIPT this = new CS_ANTISPAM_SCRIPT($_this);
string testo = "   Dante       Alighieri   ";
this->Print( this->Format("Trim: \"%s\"\n",this->Trim(testo));
this->Print( this->Format("TrimLeft: \"%s\"\n",this->TrimLeft(testo));
this->Print( this->Format("TrimRight: \"%s\"\n",this->TrimRight(testo));
this->Print( this->Format("TrimInternal: \"%s\"\n",this->TrimInternal(testo));
this->Printt( this->Format("Trim All: \"%s\"\n",this->Trim(this->TrimInternal(testo)));


Out:

Trim: "Dante       Alighieri"
TrimLeft: "Dante       Alighieri   "
TrimRight: "   Dante       Alighieri"
TrimInternal: "   Dante Alighieri   "
Trim All: "Dante Alighieri"