Results 1 to 4 of 4

Thread: Replace

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 1999
    Location
    Proctor,Vt USA
    Posts
    47
    Using Vb6 and the "Replace Function" in a function allowing the user to remove things from a string like ">". This works great but can you use it to trim spaces after a crlf?When the string is returned to the Multiline textbox I'm trying to get all aligned to the left but all the spaces stay. I've tried using the trim fuction with no luck. IF not is it possible with the "Split Function"? Thanks in advance

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840

    Question

    Can you be a little more specific about what you are doing?

    What do you mean by spaces following the CrLF ?? these would be on the next line? what are you splitting with? are you splitting with CRLF to cut to lines??

    Cheers


    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 1999
    Location
    Proctor,Vt USA
    Posts
    47
    It's to clean the internet ">" out of email. The only thing is the email sometimes large amount of spaces on new lines and i want to trim those spaces to get everything aligned to the left. The "replace" in vb6 i could replace the VBCRLF but i found out searching today that i could split on the vbcrlf and then use the trim function to clean both sides. It now works, thanks for helping anyway

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    The > in email actually has a following space so try

    EmailText = Replace(EmailText, "> ", "")

    ...first.
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

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