We're a place where coders share, stay up-to-date and grow their careers.
Powershell
function Remove-FirstAndLastCharacter { param( [parameter(Mandatory,ValueFromPipelineByName)] [string]$Input ) if ($Input.length -ge 3) { return $Input.SubString(1,$Input.Length - 2) } }
Powershell