RosettaCodeData/Task/Reverse-a-string/PowerShell/reverse-a-string-6.psh

4 lines
95 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
$s -replace
('(.)' * $s.Length),
-join ($s.Length..1 | ForEach-Object { "`$$_" } )