+92 332 4229 857 99ProjectIdeas@Gmail.com

Strings (Vb.net)


Strings
String is a class provided by the .net framework and it comes under namespace ‘System’.
This class contains all the functions related to the strings.

String Class functions:

Converting string to upper case
To convert a string into upper case, String.ToUpper() is a function used for this purpose.

Converting string to lower case
To convert a string into lower case, String.ToLower() is a function used for this purpose.

Finding a substring from a string
For finding a substring from a string, String.Substring() is a function used for this purpose.

Checking whether a string starts from a desired character or not
For checking whether a string starts from a desired character or not, String.StartsWith() is a function used for this purpose.

Splitting a string
For splitting a string, String.Split() is a function used for this purpose.

Replacing old characters with new character in a string
For replacing old characters with new character in a string, String.Replace() is a function used for this purpose.

Removing characters from a string
For removing characters from a string, String.Remove() is a function used for this purpose.

Finding the length of a string
For finding the length of a string, String.Length is a function used for this purpose.

Checking a string whether it is empty or not
For checking a string whether it is empty or not, String.IsNullOrEmpty() is a function used for this purpose.

Inserting a new string in the existing string
For inserting a new string in the existing string, String.Insert() is a function used for this purpose.

Finding the index of a particular character or a string
For finding the index of a particular character or a string, String.IndexOf() is a function used for this purpose.

Checking the equality of two strings
For checking the equality of two strings, String.Equals() is a function used for this purpose.

Checking whether a string ends on a desired character or not
For checking whether a string ends on a desired character or not, String.EndsWith() is a function used for this purpose.

Copying one string to another string
For copying one string to another string, String.Copy() is a function used for this purpose.

Concatenate number of strings
To concatenate a number of strings, String.Concat() is a function used for this purpose.

Comparing strings
To compare 2 strings, String.Compare() is a function sued for this purpose.

Format strings
To format a string, String.Format() is a function used for this purpose.

0 comments: