RosettaCodeData/Task/Reverse-a-string/PowerShell/reverse-a-string-6.ps1
2026-04-30 12:34:36 -04:00

3 lines
95 B
PowerShell

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