October 2017
Intermediate to advanced
440 pages
11h 47m
English
The Substring method selects part of a string. Substring can select everything after a specific index:
$myString = 'abcdefghijklmnopqrstuvwxyz' $myString.Substring(20) # Start at index 20. Returns 'uvwxyz'
Or it can select a specific number of characters from a starting point:
$myString = 'abcdefghijklmnopqrstuvwxyz' $myString.Substring(3, 4) # Start at index 3, get 4 characters.
The index starts at 0, counting from the beginning of the string.
Read now
Unlock full access