vbs trim whitespaces

Discussion in 'C#' started by t7584, Apr 10, 2006.

  1. #1
    vbs
    is there a function in vbs that can trim whitespaces (remove whitespaces on both sides of string )
     
    t7584, Apr 10, 2006 IP
  2. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    sure.

    trim(" ~hi there~ ") produces "~hi there~"
    ltrim(" ~hi there~ ") produces "~hi there~ "
    rtrim(" ~hi there~ ") produces " ~hi there~"

    to use it on a variable:

    yourvariable = " hi there "
    trimmedvariable = trim(yourvariable)
     
    vectorgraphx, Apr 10, 2006 IP