String matching: Difference between revisions

m (→‎{{header|zkl}}: formatting)
Line 823:
 
=={{header|Elena}}==
<lang elena>#define system'routines.
#define system'routines.
#define extensions.
 
#symbol program =
[
(literalControl#var s starting:="hello" &with:"hel") ?.
(s startingWith:"hel") ?
[
consoleExconsole writeLine:s:"hello starts with hel".
].
(literalControls ending:"hello" &withendingWith:"llo") ?
[
consoleExconsole writeLine:s:"hello ends with llo".
].
 
(literalControls contain:"el" &incontaining:"hello") ?
[
consoleExconsole writeLine:s:"hello contains el".
].
].</lang>
Anonymous user