int counter;
str lTrim = _str;
str rTrim;
//LTrim
for(counter = strlen(_str); counter >= 1 ; counter--)
{
if(confind(_trimStr, strdel(lTrim, 1, counter - 1))) {
lTrim = strdel(lTrim, counter, strlen(lTrim));
}
else
{
break;
}
}
//RTrim
rTrim = lTrim;
for(counter = 1; counter <= strLen(lTrim) ; counter++)
{
if(confind(_trimStr, strdel(rTrim, 2, strlen(rTrim)))) {
rTrim = strdel(rTrim, 1, 1);
}
else
{
break;
}
}
return rTrim;
}
Usage: info("trimString( "0000000000789798798.0000000", ["0", "."] ) -> " + trimString("0000000000789798798.0000000", ["0", "."] ) );
bape
ReplyDeleteoff white shoes
jordan shoes
bape clothing
westbrook shoes
bape
off white
giannis shoes
supreme hoodie
goyard store
steph curry shoes
ReplyDeletesupreme new york
jordan outlet