RosettaCodeData/Task/Palindrome-detection/PowerShell/palindrome-detection-1.ps1
2026-04-30 12:34:36 -04:00

5 lines
161 B
PowerShell

Function Test-Palindrome( [String] $Text ){
$CharArray = $Text.ToCharArray()
[Array]::Reverse($CharArray)
$Text -eq [string]::join('', $CharArray)
}