mirror of
https://github.com/Xevion/exercism.git
synced 2025-12-13 06:11:33 -06:00
PowerShell - leap, raindrops, reverse-string, two-fer
This commit is contained in:
11
powershell/reverse-string/ReverseString.ps1
Normal file
11
powershell/reverse-string/ReverseString.ps1
Normal file
@@ -0,0 +1,11 @@
|
||||
Function Get-ReverseString {
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Position=1, ValueFromPipeline=$true)]
|
||||
[string]$Forward
|
||||
)
|
||||
|
||||
$x = $Forward.ToCharArray()
|
||||
[array]::Reverse($x)
|
||||
return -join $x
|
||||
}
|
||||
Reference in New Issue
Block a user