Anonymous user
String matching: Difference between revisions
→{{header|Lasso}}: Added Lasso Example
No edit summary |
(→{{header|Lasso}}: Added Lasso Example) |
||
Line 1,020:
In fact, it happens 2 times within 'tacoloco', at indexes 2, 6.
3: Does 'tacoloco' end with 'co'? Yes.</pre>
=={{header|Lasso}}==
<lang Lasso>local(
a = 'a quick brown peanut jumped over a quick brown fox',
b = 'a quick brown'
)
//Determining if the first string starts with second string
#a->beginswith(#b) // true
//Determining if the first string contains the second string at any location
#a >> #b // true
#a->contains(#b) // true
//Determining if the first string ends with the second string
#a->endswith(#b) // false</lang>
=={{header|Julia}}==
|