|
-
Apr 30th, 2004, 06:12 AM
#6
Hyperactive Member
Ehm, ehm,...I premitted:"if I understood well"
Really, perhaps that way to write names is an english habit, we don't use it. I thought our friends Jenbug needed to obtain a particular format to export/import in other application, or....I don't know!
Anyway I tried to adapt my code:
VB Code:
Dim parts() As String = str.Split(Char.Parse(" "))
str = ""
Dim i As Int16 = parts.Length - 1
Do While i >= 0
str = str & parts(i)
If i = parts.Length - 1 Then
str = str & ", "
Else
str = str & " "
End If
i -= 1
Loop
Debug.WriteLine(str.TrimEnd)
and now you can read:
Smith, J. Anderson Carol
Anyway your code is surely good, too. This is a little more compact. I had to write this for a friend and so I had time to squeeze my brain on the problem. I'm a beginner. I'm sure you are a better programmer than me (really think so!) and I'm sure that in 95% of situations your code should be better of mine, too. But in this particular application, I prefer mine. Then Jenbug will decide...! Good job.
Live long and prosper (Mr. Spock)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|