<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Exiv2: Util Namespace Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.4 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul> </div> <div class="tabs"> <ul> <li><a href="namespaces.html"><span>Namespace List</span></a></li> <li><a href="namespacemembers.html"><span>Namespace Members</span></a></li> </ul> </div> <h1>Util Namespace Reference</h1>Contains utility classes and functions. Most of these are wrappers for common C functions that do not require pointers and memory considerations. <a href="#_details">More...</a> <p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Classes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classUtil_1_1Getopt.html">Getopt</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Parse the command line options of a program. <a href="classUtil_1_1Getopt.html#_details">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#2d5eb823f2910e392a04c146c54f9543">dirname</a> (const std::string &path)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the directory component from the <em>path</em> string. See dirname(3). <a href="#2d5eb823f2910e392a04c146c54f9543"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#0ec92119bdb7f1269693f1ee94d360ea">basename</a> (const std::string &path, bool delsuffix=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the filename component from the <em>path</em> string. See basename(3). If the <em>delsuffix</em> parameter is true, the suffix will be removed. <a href="#0ec92119bdb7f1269693f1ee94d360ea"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a61f770944bfdb930ec8241c529887b8"></a><!-- doxytag: member="Util::suffix" ref="a61f770944bfdb930ec8241c529887b8" args="(const std::string &path)" --> std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#a61f770944bfdb930ec8241c529887b8">suffix</a> (const std::string &path)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the suffix from the path string. Normally, the suffix is the substring of the basename of path from the last '.' to the end of the string. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e3760f32ad9aaad800e68917578c7220"></a><!-- doxytag: member="Util::strtol" ref="e3760f32ad9aaad800e68917578c7220" args="(const char *nptr, long &n)" --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#e3760f32ad9aaad800e68917578c7220">strtol</a> (const char *nptr, long &n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a C string to a long value, which is returned in n. Returns true if the conversion is successful, else false. n is not modified if the conversion is unsuccessful. See strtol(2). <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac2efa1797a1bd038485be421ca80ca3"></a><!-- doxytag: member="Util::replace" ref="ac2efa1797a1bd038485be421ca80ca3" args="(std::string &text, const std::string &searchText, const std::string &replaceText)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceUtil.html#ac2efa1797a1bd038485be421ca80ca3">replace</a> (std::string &text, const std::string &searchText, const std::string &replaceText)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Replaces all occurences of <em>searchText</em> in the <em>text</em> string by <em>replaceText</em>. <br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Contains utility classes and functions. Most of these are wrappers for common C functions that do not require pointers and memory considerations. <hr><h2>Function Documentation</h2> <a class="anchor" name="0ec92119bdb7f1269693f1ee94d360ea"></a><!-- doxytag: member="Util::basename" ref="0ec92119bdb7f1269693f1ee94d360ea" args="(const std::string &path, bool delsuffix=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Util::basename </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>path</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>delsuffix</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Get the filename component from the <em>path</em> string. See basename(3). If the <em>delsuffix</em> parameter is true, the suffix will be removed. <p> This function can handle Windows paths to some extent: c:\bar should be fine, \\bigsrv\foo also, but \\bigsrv alone doesn't work. </div> </div><p> <a class="anchor" name="2d5eb823f2910e392a04c146c54f9543"></a><!-- doxytag: member="Util::dirname" ref="2d5eb823f2910e392a04c146c54f9543" args="(const std::string &path)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Util::dirname </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>path</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Get the directory component from the <em>path</em> string. See dirname(3). <p> This function can handle Windows paths to some extent: c:\bar should be fine, \\bigsrv\foo also, but \\bigsrv alone doesn't work. </div> </div><p> <hr size="1"><address style="text-align: right;"><small>Generated on Tue Feb 5 11:51:15 2008 for Exiv2 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address> </body> </html>