RosettaCodeData/Task/Reverse-a-string/PowerShell/reverse-a-string-5.psh
2023-07-01 13:44:08 -04:00

3 lines
108 B
Text

$s -replace
('(.)' * $s.Length),
[string]::Join('', ($s.Length..1 | ForEach-Object { "`$$_" }))