Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 132,229 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,081 people online right now. Registration is fast and FREE... Join Now!




Pig Latin

 
Reply to this topicStart new topic

Pig Latin, Pig Latin Code

Austink1308
post 20 Feb, 2008 - 07:00 AM
Post #1


New D.I.C Head

*
Joined: 14 Feb, 2008
Posts: 3

I need help to figure out how to make this code work for multiple words not just one word here is my code



Dim str1stChar, strInput As String
strInput = txtInput.Text
str1stChar = txtInput.Text.Substring(0, 1)
Dim strOutput As String = ""
Select Case str1stChar.ToUpper
Case "A", "E", "I", "O", "U"
strOutput = (strInput.ToUpper & "WAY")
Case Else
strOutput = (strInput.Substring(1) & str1stChar & "AY")
End Select
MessageBox.Show(strOutput, "Pig Latin")
User is offlineProfile CardPM

Go to the top of the page

LookNAO
post 20 Feb, 2008 - 08:56 AM
Post #2


D.I.C Head

**
Joined: 28 Dec, 2007
Posts: 66



Thanked 1 times
My Contributions


Split it... Then loop through it...

CODE

dim A() as string
dim Acnt as int

'This builds an array with each word....
A = split(inputstr, " ",, vbTextCompare)

   For Acnt = 0 to ubound(a)
       'Each word is A(x)....
       oday ouryay igpay atinlay erehay....

    next Acnt




User is offlineProfile CardPM

Go to the top of the page

Austink1308
post 22 Feb, 2008 - 07:03 AM
Post #3


New D.I.C Head

*
Joined: 14 Feb, 2008
Posts: 3

QUOTE(LookNAO @ 20 Feb, 2008 - 09:56 AM) *

Split it... Then loop through it...

CODE

dim A() as string
dim Acnt as int

'This builds an array with each word....
A = split(inputstr, " ",, vbTextCompare)

   For Acnt = 0 to ubound(a)
       'Each word is A(x)....
       oday ouryay igpay atinlay erehay....

    next Acnt




That still didnt work
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/21/08 09:13PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month