Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 2.42 KB

basic-string-operations.md

File metadata and controls

44 lines (35 loc) · 2.42 KB
title description ms.date ms.technology helpviewer_keywords ms.assetid author ms.author ms.custom
Basic String Operations in .NET
Learn about the basic operations that you can perform on strings.
03/30/2017
dotnet-standard
strings [.NET Framework], basic string operations
custom strings
8133d357-90b5-4b62-9927-43323d99b6b6
rpetrusha
ronpet
seadec18

Basic String Operations in .NET

Applications often respond to users by constructing messages based on user input. For example, it is not uncommon for Web sites to respond to a newly logged-on user with a specialized greeting that includes the user's name. Several methods in the xref:System.String?displayProperty=nameWithType and xref:System.Text.StringBuilder?displayProperty=nameWithType classes allow you to dynamically construct custom strings to display in your user interface. These methods also help you perform a number of basic string operations like creating new strings from arrays of bytes, comparing the values of strings, and modifying existing strings.

In This Section

Creating New Strings
Describes basic ways to convert objects into strings and to combine strings.

Trimming and Removing Characters
Describes how to trim or remove characters in a string.

Padding Strings
Describes how to insert characters or empty spaces into a string.

Comparing Strings
Describes how to compare the contents of two or more strings.

Changing Case
Describes how to change the case of characters within a string.

Using the StringBuilder Class
Describes how to create and modify dynamic string objects with the xref:System.Text.StringBuilder class.

How to: Perform Basic String Manipulations
Demonstrates the use of basic string operations.

Related Sections

Type Conversion in .NET
Describes how to convert one type into another type.

Formatting Types
Describes how to format strings using format specifiers.