1,105,546 Community Members

Splitting a string up to be used individually

Member Avatar
SubatomicRhythm
Newbie Poster
1 post since Apr 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Im trying to work out how to do a project called pig latin in vb.net 2003... so far I've gotten it to work for a single word. If there are spaces it still acts like there is only one word with the rules (ex: monkey stuff = onkey stuffmay) I know that i have to figure a way to seperate the string up if there is a space and do the rules for pig latin for each word and then make it show up in a message box but I'm stuck... as soon as i can get it to split I have to calculate the number of words starting with a variable and percent of said words and so on which shouldnt be hard with an If Then statement if i can figure out the first part. Any help is appreciated

Member Avatar
apegram
LINQ!
550 posts since Jan 2010
Reputation Points: 302 [?]
Q&As Helped to Solve: 137 [?]
Skill Endorsements: 10 [?]
Team Colleague
 
1
 
Dim input As String = "this is a sentence"
Dim words() As String = input.Split(" "c)

For Each word As String In words
   ' do something here
Next
Question Answered as of 4 Years Ago by apegram
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: