title: How do I get the int ASCII value of a character in Cocoa?
body: <p>How do I get the ASCII value as an int of a character in Cocoa? I found an answer for doing this in python, but I need to know how to do this in Cocoa. ( I am still a noob in Cocoa).<br>
  Python method:<br>
  use function ord() like this:  </p>
  
  <pre><code>&gt;&gt;&gt; ord('a')  
  97
  </code></pre>
  
  <p>and also chr() for the other way around:</p>
  
  <pre><code>&gt;&gt;&gt; chr(97)  
  'a'
  </code></pre>
  
  <p>how do I do this in Cocoa?</p>