Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
5
Task/String-matching/Forth/string-matching.fth
Normal file
5
Task/String-matching/Forth/string-matching.fth
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
: starts-with ( a l a2 l2 -- ? )
|
||||
tuck 2>r min 2r> compare 0= ;
|
||||
: ends-with ( a l a2 l2 -- ? )
|
||||
tuck 2>r negate over + 0 max /string 2r> compare 0= ;
|
||||
\ use SEARCH ( a l a2 l2 -- a3 l3 ? ) for contains
|
||||
Loading…
Add table
Add a link
Reference in a new issue