1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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