The Artima Developer Community
Sponsored Link

Web Services Forum
reverse words

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
fatima zero

Posts: 5
Nickname: phantomeya
Registered: Oct, 2005

reverse words Posted: Nov 14, 2005 9:28 AM
Reply to this message Reply
Advertisement
hi...plz can you help men in my code... i want to reverse all words in the string....not just the string backward
for example if the input is (the cat) i want the out put (eht tac) and not (tac eht)
and this is my code

Private Sub btnB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnB.Click
Dim st As String = " "
Dim I As Integer
Dim x As String
Dim n As Integer
Dim r As String
Dim w As String

x = Trim(txtB.Text)
n = InStr(x, " ")

r = Mid(x, 1, 1)
Do

For I = n To 1 Step -1

st = st & Mid(x, I, 1)

Next
txtA.Text = st
w = w + 1
Loop While (r = " ")


End Sub

Topic: soapenv:Server.userExceptionjava.lang.NullPointerException Previous Topic   Next Topic Topic: Null Serializer Factory Found

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use