# "contains" as operator?

**URL:** <https://discourse.julialang.org/t/contains-as-operator/74715>\
**Category:** Internals & Design\
**Created:** [January 16, 2022, 7:05pm UTC](https://discourse.julialang.org/t/contains-as-operator/74715 "2022-01-16T19:05:38Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [January 17, 2022, 10:05am UTC](https://discourse.julialang.org/t/contains-as-operator/74715/17 "2022-01-17T10:05:30Z")

</div>

> [@Chris\_Green](#):
>
> A problem with both “occursin” and “contains” is some mental ambiguity about the argument orders (they are opposites).

I think you should just ignore `occursin`, and use `contains`. If I don’t misremember, the latter simply replaces the former, and `occursin` is mostly around for backwards compatibility.

I’m not so sure `in` should work on substrings. I would rather see a dedicated operator for this.

Oh, BTW, this post: [Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757) has some good tips on writing posts. In particular, it shows you how to include formatted and inline code, so you don’t have to use e.g. bold.

---

_[View the full topic](https://discourse.julialang.org/t/contains-as-operator/74715)._
