Microsoft
Software
Hardware
Network
Question : VB.Net String remove everthing after second space in string
Hello I am trying to query from VB.Net, but were I pull my data it gives me full name including lastname, firstname and middle name.
I would like to remove everthing after 2nd white space example
String Sampson, Robert Steve should just be Sampson, Robert
and
String Sahdala, Lesbia P should just be Sahdala, Lesbia
It seems like something I should be able to do with trim command. It seems like a simple thing but can't seem to figure out Syntax.
Anyone have any ideas or maybe maybe have another way
Answer : VB.Net String remove everthing after second space in string
I can't index :(
Dim s as String = "String Sampson, Robert Steve should just be Sampson, Robert"
Dim a() = s.Split(" ")
If a.Length > 2 Then
s = a(0) + a(1)
End If ' else s is unchanged
Random Solutions
Excel treeview object
vb.net httpwebrequest timeout not working correctly
How to Setup Airport Extreme as DHCP Server on LAN with SonicWall
Setting up a PC with Multiple Operating Systems (Windows 98 and Windows XP Pro)
SBS2003 no http access just https
Upgrade Sqlite in RHEL5.4
System.FormatException:Dat
agridviewC
omboboxcel
l value is not valid
How do I enable audio mapping over RDP on Windows 7?
Coookie not storing information
SBS server 2003 VPN connection