Skip to content

Commit

Permalink
Remove redundant instruction, lein release :minor
Browse files Browse the repository at this point in the history
  • Loading branch information
lspector authored May 6, 2023
1 parent 8f8c6dc commit e2c9d8c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/clojush/instructions/string.clj
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 215,6 @@
:boolean
(pop-item :string state))))))

(define-registered
string_contains ;;true if top string is a substring of second string; false otherwise
^{:stack-types [:string :boolean]}
(fn [state]
(if (empty? (rest (:string state)))
state
(let [sub (top-item :string state)
full (stack-ref :string 1 state)
result-boolean (if (<= 0 (.indexOf full sub))
true
false)]
(push-item result-boolean
:boolean
(pop-item :string (pop-item :string state)))))))

(define-registered
string_containschar ; true if the top char is in the top string
^{:stack-types [:string :boolean :char]}
Expand Down

0 comments on commit e2c9d8c

Please sign in to comment.