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

3 lines
95 B
Text

$s -replace
('(.)' * $s.Length),
-join ($s.Length..1 | ForEach-Object { "`$$_" } )