A problem with trimstart cmdlet
Posted: Thu Nov 26, 2015 3:47 am
I have an script with the cmdlet trimstart and I've checked that when the string that I want starts with "S" it trims the "S" too. F.ex. i have
$user='POSPOCPA\Super3'
$user=$user.TrimStart("POSPOCPA\")
The result is $user=uper3
but if I have
$user='POSPOCPA\super3'
$user=$user.trimstart("POSPOCPA\")
then the result is ok $user=Super3
is there any explication for this?
Thanks
$user='POSPOCPA\Super3'
$user=$user.TrimStart("POSPOCPA\")
The result is $user=uper3
but if I have
$user='POSPOCPA\super3'
$user=$user.trimstart("POSPOCPA\")
then the result is ok $user=Super3
is there any explication for this?
Thanks