Text between: Difference between revisions

m
(Added XPL0 example.)
m (→‎{{header|Wren}}: Minor tidy)
 
(One intermediate revision by one other user not shown)
Line 2,947:
Output = "Rosetta Code world"
</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}}==
Line 3,902 ⟶ 3,916:
{{trans|Kotlin}}
{{libheader|Wren-fmt}}
<syntaxhighlight lang="ecmascriptwren">import "./fmt" for Fmt
 
var textBetween = Fn.new { |str, start, end|
9,482

edits