Extract file extension: Difference between revisions

→‎{{header|Quackery}}: added code to deal with empty string
(Added Quackery.)
(→‎{{header|Quackery}}: added code to deal with empty string)
Line 2,072:
witheach [ bit | ] ] constant
& 0 > ] is validchar ( c --> b )
[ dup -1$ peek"" char= . =if iffdone
dup -1 peek char . = iff
[ drop $ "" ] done
$ "" swap
Line 2,083 ⟶ 2,084:
else
[ 2drop $ "" conclude ] ]
dup 1$ split"" drop= if done
dup 0 peek char . nested != if
[ drop $ "" ] ] is extension ( $ --> $ )
1,462

edits