CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Posts
    492

    Removing Character from String

    I have a string on a VBScript ASP page and I want to remove all occurances of a specific character. I cannot find the function that does this.

    For example, if I have "Cat-dog-mouse" and I want to remove all '-' characters so I have "catdogmouse". The MSDN documentation isn't being very helpful right now as the function that does this does not appear to be listed.

    Thanks

    Why are the "tolerant" so easy to offend?

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Removing Character from String

    Try to use Replace function

    Replace(string1,"-","")'-put "" in string 1 instead of "-"

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

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

Featured