String matching: Difference between revisions

m
(→‎{{header|Elixir}}: add Optional requirements)
Line 1,932:
=={{header|Oforth}}==
 
<lang Oforth>func: stringMatching(s1, s2)
{
| i |
s2 isAllAt(s1, 1) ifTrue: [ System.Out s1 << " begins with " << s2 << cr ]
Line 1,946 ⟶ 1,945:
System.Out s1 << " includes " << s2 << " at position : " << i << cr
i s2 size + ->i
] ;</lang>
}</lang>
 
{{out}}
<pre>
>stringMatching( "arduinoardblobard", "ard") stringMatching
arduinoardblobard begins with ard
arduinoardblobard ends with ard
1,015

edits