Help with trim

Results 1 to 4 of 4

Thread: Help with trim

  1. #1
    Join Date
    Dec 1969

    Default Help with trim

    I need some help. I am trying to get the database post into a textarea but it filles in alot of spaces. So I would like to trim off some spaces.<BR>The varable name is strtutorstuff please help<BR>Thanks

  2. #2
    Rokea Guest

    Default RE: Help with trim

    did you try Trim(MyVar) ??<BR><BR>Removes spaces before and after your variable..<BR><BR>Rokea

  3. #3
    Jason Guest

    Default RE: Help with trim

    You can use Myvar = trim(myvar)

  4. #4
    Ian S Guest

    Default RE: Help with trim

    Trim will only remove the spaces at the beginning and end<BR>of the string variable. If you want to replace<BR>large amounts of spaces then use the replace function<BR><BR>for example, this removes any two spaces and replaces <BR>them with one:<BR><BR>&#060;%<BR>strTutorStuff = Replace(strTutorStuff, chr(32)&chr(32), chr(32))<BR>%&#062;<BR><BR>* note - i think chr(32) is space but you must confirm this<BR><BR>or<BR><BR>&#060;%<BR>strTutorStuff = Replace(strTutorStuff, " ", " ")<BR>%&#062;<BR><BR><BR>For more info on the replace function at:<BR><BR><BR>under the vbscript section<BR><BR><BR>hth,<BR>ian S

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts