8
Strings, Numbers, and Dates
Access to .NET Framework means that PowerShell comes with a wide variety of ways to work with simple data types, such as strings and numbers.
This chapter covers the following topics:
- Manipulating strings
- Converting strings
- Manipulating numbers
- Manipulating dates and times
Manipulating strings, numbers, and dates have many uses, including data cleansing, retrieving specific information, and applying calculations.
Manipulating strings
The .NET System.String
type offers a wide array of methods for manipulating or inspecting strings. The following methods are case-sensitive but are, in many cases, faster alternatives to using regular expressions, for situations when the time it takes for a script to run is important. ...
Get Mastering PowerShell Scripting - Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.