String matching: Difference between revisions

no edit summary
m (→‎{{header|Icon}} and {{header|Unicon}}: Regularize non-standard header markup)
No edit summary
Line 771:
 
=={{header|Arturo}}==
<lang rebol>print prefix? "abcd" "ab"
print prefix? "abcd" "cd"
print suffix? "abcd" "ab"
print suffix? "abcd" "cd"
 
<lang arturo>print "'abcd' starts with 'ab' = " + [startsWithcontains? "abcd" "ab"]
print contains? "abcd" "xy"
 
print "'abcd' contains 'bc' =in? " + [containsab" "abcd" "bc"]
print "'bc' found in 'abcd' at location =? " + [indexxy" "abcd" "bc"]
 
print "'abcd' ends with 'zn' = " + [endsWithindex "abcd" "znbc"]</lang>
print index "abcd" "xy"</lang>
 
{{out}}
 
<pre>'abcd' starts with 'ab' = true
false
'abcd' contains 'bc' = true
false
'bc' found in 'abcd' at location = 1
true
'abcd' ends with 'zn' = false</pre>
true
false
true
false
1
null</pre>
 
=={{header|AutoHotkey}}==
1,532

edits