Results 1 to 4 of 4

Thread: A Faster Replace Function.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    NY, USA.
    Posts
    240

    Wink

    Hi,
    Does anyone have a Replace Function that is much fast than VB's Replace Function ?
    Omar
    [email protected]
    http://omar.caribwalk.com
    To God Be The Glory

    I see Tech People ...

  2. #2
    Guest
    If you have the facilities, you could make a DLL file in C++ (which uses different methods to handle strings and is a bit faster) and then incorporate it into your VB app.

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Question

    What type of string or text you wish to replace?

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    NY, USA.
    Posts
    240
    Hi chris,
    I am creating a programming web site and I want to allow
    other user to add and download and view code submissions.

    For example:
    I want retrieve the code from a memo field and display
    it in html format on the web site. But I want the code to
    have certain VB functions colorized - such as If ,
    Then, Else, End IF, Do, Loop, While .. etc
    .

    But to do that I would have to do this


    Code:
       myText = Replace(myText, "If", "<b>If</b>", 1, -1, 1)
       myText = Replace(myText, "Then", "<b>If</b>", 1, -1, 1)
       myText = Replace(myText, "Else", "<b>If</b>", 1, -1, 1)
    
    ... and so on for every keyword.
    
    What would be a easier way?
    P.S. I'm using ASP

    [Edited by omarswan on 06-25-2000 at 01:36 AM]
    Omar
    [email protected]
    http://omar.caribwalk.com
    To God Be The Glory

    I see Tech People ...

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