Palindrome detection: Difference between revisions

no edit summary
(Picat: forgot the strip/1 function.)
No edit summary
Line 5,493:
{{out}}
<pre>True</pre>
 
=={{header|Vlang}}==
<lang javascript>fn is_pal(ss string) bool {
s := ss.runes()
for i in 0..s.len/2 {
if s[i] != s[s.len-1-i]{
return false
}
}
return true
}
fn main() {
for word in ["rotor", "rosetta", "step on no pets", "été", "wren", "🦊😀🦊"] {
println('$word => ${is_pal(word)}')
}
}</lang>
 
{{out}}
<pre>
Are the following palindromes?
rotor => true
rosetta => false
step on no pets => true
été => true
wren => false
🦊😀🦊 => true
</pre>
 
=={{header|Wortel}}==
338

edits