String matching: Difference between revisions

no edit summary
No edit summary
Line 400:
println(string1.endsWith(string2))
}</lang>
 
=={{header|Elena}}==
<lang elena>#define std'dictionary'*.
#define std'routines'strings'*.
 
// --- Program ---
 
#symbol Program =
[
#if "hello"~eliteralop starting_with'if:"hel"
[
'program'output << "hello starts with hel%n".
].
#if "hello"~eliteralop ending_with'if:"llo"
[
'program'output << "hello ends with llo%n".
].
#if (-1) ifequal:("hello"~eliteralop first_occ'find:"el")
| [
'program'output << "hello contains el%n".
].
].</lang>
 
=={{header|Erlang}}==
Anonymous user