...
/Working with Text: Getting Length and Character of String
Working with Text: Getting Length and Character of String
Learn about common data types for working with text, including char, string, StringBuilder, and Regex.
We'll cover the following...
We'll cover the following...
One of the other most common types of data for variables is text. The most common types in .NET for working with text are shown in the following table:
Namespace | Type | Description |
|
| Storage for a single text character |
|
| Storage for multiple text characters |
|
| Efficiently manipulates strings |
|
| Efficiently pattern-matches strings |
Getting the length of a string
Let’s explore some common tasks when working with text; for example, sometimes we need to find out the length of a piece of text stored in a string
variable:
...