title: Differences between strings.Contains and strings.ContainsAny in Golang
body: <p>In the source code:</p>
  
  <pre class="lang-golang prettyprint-override"><code>// Contains returns true if substr is within s.
  func Contains(s, substr string) bool {
      return Index(s, substr) &gt;= 0
  }
  
  // ContainsAny returns true if any Unicode code points in chars are within s.
  func ContainsAny(s, chars string) bool {
      return IndexAny(s, chars) &gt;= 0
  }
  </code></pre>
  
  <p>the only difference seems to be <code>substr</code> and <code>the Unicode code points in chars</code>. I wrote some test to test both of them. Their behaviors seem to be identical. I don't understand when to use which.</p>