RosettaCodeData/Task/Reverse-a-string/PowerShell/reverse-a-string-5.psh
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

3 lines
108 B
Text

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