RosettaCodeData/Task/Palindrome-detection/PowerShell/palindrome-detection-1.psh

6 lines
161 B
Text
Raw Permalink Normal View History

2013-10-27 22:24:23 +00:00
Function Test-Palindrome( [String] $Text ){
$CharArray = $Text.ToCharArray()
[Array]::Reverse($CharArray)
2019-09-12 10:33:56 -07:00
$Text -eq [string]::join('', $CharArray)
2013-10-27 22:24:23 +00:00
}