title: bitwise check if flag present
body: <p>Is there a method typically used to check if a flag is present in an int/other data type? I figured out something like this:</p>
  
  <pre><code>if ((host&amp;flagtocheckfor)==flagtocheckfor)
  </code></pre>
  
  <p>Which works fine- however it's such a common method of setting flags is this the way flags are usually checked? Or is there a more concise method?</p>