Text between: Difference between revisions

Content added Content deleted
(Added XPL0 example.)
(added RPL)
Line 2,947: Line 2,947:
Output = "Rosetta Code world"
Output = "Rosetta Code world"
</pre>
</pre>

=={{header|RPL}}==
{{works with|HP|48G}}
« → start end
« '''CASE'''
start "start" == '''THEN''' 1 '''END'''
DUP start POS '''THEN''' LASTARG start SIZE + '''END'''
DUP SIZE 1 +
'''END'''
OVER SIZE SUB
1 OVER end POS 1 -
'''IF''' DUP 0 < end "end" == OR '''THEN''' DROP OVER SIZE '''END'''
SUB
» » '<span style="color:blue">BTWN</span>' STO <span style="color:grey">''@ ( "text" "start" "end" -- "text_between" )''</span>


=={{header|Ruby}}==
=={{header|Ruby}}==