String matching: Difference between revisions

(Add LabVIEW)
Line 1,440:
Rosetta Code ends with Code
</pre>
 
=={{header|TXR}}==
 
<lang txr>@line
@(cases)
@ line
@ (output)
second line is the same as first line
@ (end)
@(or)
@ (skip)@line
@ (output)
first line is a suffix of the second line
@ (end)
@(or)
@ line@(skip)
@ (output)
first line is a suffix of the second line
@ (end)
@(or)
@ prefix@line@(skip)
@ (output)
first line is embedded in the second line at position @(length prefix)
@ (end)
@(or)
@ (output)
first line is not found in the second line
@ (end)
@(end)</lang>
 
<pre>$ txr cmatch.txr -
123
01234
first line is embedded in the second line at position 1
$ txr cmatch.txr -
123
0123
first line is a suffix of the second line</pre>
 
[[Category: String manipulation]]
Anonymous user