Starts/EndsWith Method ~ Determines whether or not a string of characters are at the beginning or end of a string.
phone = InputBox("10-digit phone numer:", "Phone")Do While phone.StartsWith("312") phoneListBox.Items.Add(phone) phone = InputBox("10-digit phone number", "Phone")LoopDim cityState AS String = cityStateTextBox.Text.ToUpper()If cityState.EndsWith("CA") Then stateLabel.Text = "California customer"End If
Contains Method ~ Searches a string to find if it contains a sting of symbols.
Dim address As String = "345 Main Street, Gelndale, CA"Dim isContained As BooleanisContained = address.Contains("Main Street")
IndexOf Method ~ Like the Contains method, but it gives back an integer telling you where the string is.
Dim message As String = "Have a nice day"Dim indexNum As IntegerindexNum = message.IndexOf("nice", 0)
Substring Method ~ used to access any number of characters contained in a string, such as letter, words, etc.
Dim fullName As String = "Peggy Ryan"firstName = fullName.Substring(0, 5)lastName = fullName.Substring(6)
String.Compart Method ~ Allows you to compart two strings for whether or not they are similar.
Dim result As Integerresult = String.Compare("Dallas", "Dallas")
Like Operator ~ Finds out if two strings are equal to each other.
isEqual = firstName.ToUpper() Like "B?LL"
Radio Button Tool ~ used to add a radio button to the interface.
Check Box Tool ~ used to add a check box button to the interface.
Monday, March 16, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment