VB has many string manipulation functions.
Left(strOrigin, intLen) will extract the given number of left most characters from the given string.
Right(strOrigin, intLen) will extract the given number of right most characters from the given string.
Mid(strOrigin, intStart, intLen) will extract the intLen of characters from the strOrigin starting from intStart index.
If you are using VB.NET 2005, you have to call these functions thru Strings module of the Microsoft.VisualBasic library (which is already referenced by your VB Project).
For Example:
Dim s as String = "Hello World"
MessageBox.Show(Strings.Left(s,5))
The above example will display "Hello" in the messagebox.
But remember one thing when you are playing with the string datatype. String datatype in .NET is reference type and it is immutable. Excessive string manipulation will have impact on the performance. You should consider using StringBuilder if you need more complex/excessive string manipulation.
Hope it helps a little. ![Idea [I]](/emoticons/emotion-55.gif)
Maung Maung