
Namespace: System
Library: mscorlib.dll
The creation of an instance of the Class, an String object is easy. You only need to put the characters inside quotation marks:
String myString = "Hello World!";
For the use of the methods you can use the prefix: String or sometimes the value of the string itself.
A property:
Length
And the methods:
Compare(somestring, otherstring, boolean)
Compares two specified String objects, ignoring or honoring their case.
Concat(somestring, otherstring)
Copy(somestring)
Returns the copy.
EndsWith(somestring)
StartsWith(somestring)
Returns a boolean.
Format("{0:C}", somedouble)
Formats a value in the currency of your country (Windows version) and returns it like an string.
IndexOf(somechar)
Returns the position of the first occurrence of "somechar" (or somestring). This research can be made from an initial position to an end position.
IndexOf(somechar,init)
IndexOf(somechar ,init, end)
Insert(init,somestring)
Join(separator ,somearray)
The method Split does the reverse of Join
Split(somearray,separator)
LastIndexOf(somechar,init)
LastIndexOf(somechar ,init, end)
PadLeft(somelength)
PadRight(somelength)
Will add blanks to the string until we have "somelength".
Remove(init, quantityofchars)
Replace(oldchar, newchar)
Substring(init, quantityofchars)
Returns part of an string.
ToCharArray()
Returns an array.
Trim()
TrimEnd()
TrimStart()
These two methods exclude blanks from the extremities of a string.
PREVIOUS LESSON NEXT LESSON T.CONTENTS HOMEPAGE
