5 ms·
if (submission.title.indexOf("lisp")!=-1) submission.voteUp(); surely...
by axod 18y ago
if (submission.title.indexOf("lisp")!=-1) submission.voteUp();
surely...
- DavidSJ 18y agoI think you mean: (if (search "lisp" (submission-title submission)) (incf (submission-score submission)))
- ken 18y agoOh dear, I hope axod wouldn't have used IF with a single then-form. That's just asking for trouble. :-)
- DavidSJ 18y agoAre you worried about the return value or something?
- Maascamp 18y agoI think you mean if(strpos(strtolower($title.$body), 'lisp') !== false) ++$votes; Oh wait, this is Hacker news. Apologies.