Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,11 @@
/# Rosetta Code problem: https://rosettacode.org/wiki/String_prepend
by Galileo, 11/2022 #/
include ..\Utilitys.pmt
"the last thing the man said was the" "the" pstack
len var l >ps
1 l slice tps == if "Begins with keyword" ? endif
0 l - l slice tps == if "Ends with keyword" ? endif
tail ps> find dup if "Keyword appears first at " print 1 + print " position" ? else drop endif
drop

View file

@ -0,0 +1,22 @@
/# Rosetta Code problem: https://rosettacode.org/wiki/String_prepend
by Galileo, 11/2022 #/
include ..\Utilitys.pmt
"the last thing the man said was the" "the" pstack
( ) rot rot >ps
true while
tps find dup >ps
if swap tps 0 put swap 32 ps> set true else ps> endif
endwhile
len ps> len nip - 1 + >ps drop
len for get
dup 1 == if "Begins with keyword" ? drop else
dup tps == if "Ends with keyword" ? drop else
"Locate at position " print ?
endif endif
endfor
ps> drop