Results 1 to 10 of 10

Thread: Problem in text reversing

  1. #1
    rsitogp
    Guest

    Question Problem in text reversing

    Hello,

    I made up a program for a friend of mine who had problems copying a foregin language text from ie into word - the lines were back-to-front, I handled that problem BUT the english words and the numbers were back to front and I can't think of a way to fix that problem any ideas would be greatly appriciated.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Give an example of what you mean. I can't visualize it.

  3. #3
    rsitogp
    Guest
    I used strreverse to reverse the string but if there was let's say "this is no.12" then it came out "21.on si siht" and I want to keep the number, i.e. "12.on si siht".

  4. #4
    DaoK
    Guest
    You want to reverse not character but all word. I will work on it.

  5. #5
    DaoK
    Guest
    VB Code:
    1. Dim Splitter() As String
    2. Splitter = Split(Text1.Text, " ")
    3. Text1.Text = ""
    4. For i = UBound(Splitter) To 0 Step -1
    5.     Text1.Text = Text1.Text & " " & Splitter(i)
    6. Next i

    I think that what you want

  6. #6
    rsitogp
    Guest
    Your idea is to split the words and check if they're numbers?

  7. #7
    DaoK
    Guest
    no... can you test the code ??? Because it work...

  8. #8
    DaoK
    Guest
    It check all space chr then put in a array all word than put in a variable all array but in reverse........

  9. #9
    rsitogp
    Guest
    Thx for the help, you gave me an idea, I'll split each line by spaces and do a isnumberic check, thx!

  10. #10
    DaoK
    Guest
    No problem but my code do it, just test it

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