Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Substring/Bracmat/substring.bracmat
Normal file
27
Task/Substring/Bracmat/substring.bracmat
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
( (basestring = "The five boxing wizards jump quickly")
|
||||
& (n = 10)
|
||||
& (m = 5)
|
||||
|
||||
{ starting from n characters in and of m length: }
|
||||
& @(!basestring:? [(!n+-1) ?substring [(!n+!m+-1) ?)
|
||||
& out$!substring
|
||||
|
||||
{ starting from n characters in, up to the end of the string: }
|
||||
& @(!basestring:? [(!n+-1) ?substring)
|
||||
& out$!substring
|
||||
|
||||
{ whole string minus last character: }
|
||||
& @(!basestring:?substring [-2 ?)
|
||||
& out$!substring
|
||||
|
||||
{ starting from a known character within the string and of m length: }
|
||||
& (char = "w")
|
||||
& @(!basestring:? ([?p !char ?: ?substring [(!p+!m) ?))
|
||||
& out$!substring
|
||||
|
||||
{ starting from a known substring within the string and of m length: }
|
||||
& (find = "iz")
|
||||
& @(!basestring:? ([?p !find ?: ?substring [(!p+!m) ?))
|
||||
& out$!substring
|
||||
&
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue