October 2017
Intermediate to advanced
440 pages
11h 47m
English
Each of the methods Contains, StartsWith, and EndsWith, will return true or false depending on whether or not the string contains the specified string.
Contains returns true if the value is found within the subject string:
$string = 'I am the subject'
$string.Contains('the') # Returns $true
StartsWith and EndsWith return true if the subject string starts or ends with the specified value:
$string = 'abc'
$string.StartsWith('ab')
$string.EndsWith('bc')
Read now
Unlock full access