Results 1 to 2 of 2

Thread: String trim

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2010
    Posts
    38

    String trim

    Hi, I have this string that i would like to remove all the "\"

    Here's the string:

    Code:
    form name=\"comment_form${form_id}\" id=\"comment_form${form_id}\" onsubmit=\"return false;\"     method=\"post\" action=\"/comment_servlet?add_comment=1&comment_type=V\"><input type=\"hidden\" name=\"video_id\" value=\"7NKNfU53Kr8\">
    Here's what I tried so far
    Code:
            Dim chArr() As Char = {"\"}
            Dim upfrm As String = (See my string above)
            trstr = upfrm.Trim(chArr)
            MsgBox(trstr)
    Dim trstr As String

    I t isnt working.

  2. #2
    Super Moderator
    Join Date
    Dec 2003
    Posts
    4,787

    Re: String trim

    The code looks like VB6 - is this Vb6 or .Net? - I'm assuming this is VB.Net as your profile says VB2008 if not look here -
    http://www.vbforums.com/showpost.php...3&postcount=12

    If this is .Net have you looked at the Replace function?

    vb Code:
    1. upfrm = upfrm.Replace("/","");

    Then also in vb.net to display a messagebox you should be using MessageBox.Show() - MsgBox is old VB6 code
    Last edited by Pino; Feb 24th, 2010 at 04:35 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width