title: How To Write *nix's basename in C
body: <p>I want to extract the base name from a string, like </p>
  
  <pre><code>/opt/home/etc/sample
  </code></pre>
  
  <p>That is, I want to parse a string of large length returning <code>sample</code>, or the substring
  after the last <code>/</code> character. The string can be of any length.</p>
  
  <p>How could this be done?</p>