/*------------------------------------------------------------------- xstrip(string,stropt,strchar) stropt = "L" remove all strchars from left of string "T" right of string "B" left/right of string -------------------------------------------------------------------*/ char *xstrip(char *x, char *xopt, char *xchar){ int xcnt; int xlen; int xnlen; xlen = strlen(x); if(xopt == "B" || xopt =="L"){ xcnt = 1; while(strgetsubstr(x,xcnt,1) == xchar){ xcnt++; }//wend xnlen = xlen - xcnt + 1; x = strgetsubstr(x,xcnt,xnlen); xlen = strlen(x); }//endif if(xopt =="B" || xopt =="T"){ xcnt = xlen; while(strgetsubstr(x,xcnt,1) == xchar){ xcnt--; }//wend x = strgetsubstr(x,1,xcnt); }//endif return(x); }//xstrip