Built-in Methods

by May 28, 2010

Strings contain all the methods you may need to access its content or manipulate it otherwise. Here is how you can list those methods:

“Hello” | Get-Member -memberType *method

For example, to trim all leading and trailing white space from a text, use Trim():

” Hello “.Trim()

Or to split a path into its segments, you should use Split():


Twitter This Tip! ReTweet this Tip!