help with trim function

Discussion in 'ASP General' started by Mikael Hellström, Jan 10, 2004.

  1. Hi all,
    i need to use the trim function trim("str","?")
    My question are. How do i remove the "return sign" from a string??
    Regards Mikael
    Mikael Hellström, Jan 10, 2004
    #1
    1. Advertising

  2. Mikael Hellström

    Harag Guest

    The Trim function only takes one parameter, the string itself

    DIM str
    str = " my text "
    str = Trim(str)

    All trim does is remove the spaces from the front & the back of the
    string.

    If you need to remove other characters then you need to use the
    replace function

    str = Replace(str, vbcr, "")

    This will remove all the "return sign" from the string.

    I often use this:

    str = Replace (str, vbcrlf, "<br>")

    to convert all the returns & line feed characters into a html Break
    "<br>" This is used for like a forum system when a user enters text in
    a textbox but you then want to display that text on the HTML page like
    in a forum.



    HTH.

    Al


    On Sat, 10 Jan 2004 10:10:55 GMT, "Mikael Hellström"
    <> wrote:

    >Hi all,
    >i need to use the trim function trim("str","?")
    >My question are. How do i remove the "return sign" from a string??
    >Regards Mikael
    >
    Harag, Jan 10, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. FAQ server
    Replies:
    0
    Views:
    124
    FAQ server
    Aug 29, 2006
  2. FAQ server
    Replies:
    0
    Views:
    122
    FAQ server
    Oct 26, 2006
  3. FAQ server
    Replies:
    6
    Views:
    204
    Jonas Raoni
    Dec 25, 2006
  4. FAQ server
    Replies:
    26
    Views:
    276
    Dr J R Stockton
    Feb 26, 2007
  5. FAQ server
    Replies:
    2
    Views:
    121
    -Lost
    Apr 24, 2007
Loading...

Share This Page