Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > 7f3e5f74d754b480ec33648905c4afae > files > 513

glibmm2.4-doc-2.22.1-1mdv2010.0.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>glibmm: String Utility Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>String Utility Functions</h1>
<p>This section describes a number of utility functions for creating and manipulating strings, as well as other string-related stuff. <a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#ga6b7e8354049756e92a97554a107618ac">Glib::str_has_prefix</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; prefix)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Looks whether the string <em>str</em> begins with <em>prefix</em>. <a href="#ga6b7e8354049756e92a97554a107618ac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#ga5c4e380ffc6617ac61ca92e203e45630">Glib::str_has_suffix</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; suffix)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Looks whether the string <em>str</em> ends with <em>suffix</em>. <a href="#ga5c4e380ffc6617ac61ca92e203e45630"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#gaa44aba9faa6575d4881b1fe779464f6b">Glib::Ascii::strtod</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a string to a <code>double</code> value. <a href="#gaa44aba9faa6575d4881b1fe779464f6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#ga6465a8320d790115c41a2c76d1d3233c">Glib::Ascii::strtod</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str, std::string::size_type&amp; end_index, std::string::size_type start_index=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a string to a <code>double</code> value. <a href="#ga6465a8320d790115c41a2c76d1d3233c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#gac740e6c99bca5896ccbfc12b621491ac">Glib::Ascii::dtostr</a> (double d)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a <code>double</code> to a string, using the <code>'. </code> <a href="#gac740e6c99bca5896ccbfc12b621491ac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#ga35e288b5ce34cb15eeec907421d2b77c">Glib::strescape</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; source)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Escapes all special characters in the string. <a href="#ga35e288b5ce34cb15eeec907421d2b77c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#gad24f3547c8d6b3ec56d7f5805a11d6ab">Glib::strescape</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; source, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; exceptions)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Escapes all special characters in the string. <a href="#gad24f3547c8d6b3ec56d7f5805a11d6ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#ga85cd83bd40baf0119aac3ff0a9a5e7b2">Glib::strcompress</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; source)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Replaces all escaped characters with their one byte equivalent. <a href="#ga85cd83bd40baf0119aac3ff0a9a5e7b2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#ga1eb869894996c91c0f69dbff96714c71">Glib::strerror</a> (int errnum)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a string corresponding to the given error code, e.g. <code>"no such process"</code>. <a href="#ga1eb869894996c91c0f69dbff96714c71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__StringUtils.html#ga44ce9f689aff8abe1e3073b209f360d3">Glib::strsignal</a> (int signum)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a string describing the given signal, e.g. <code>"Segmentation fault"</code>. <a href="#ga44ce9f689aff8abe1e3073b209f360d3"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This section describes a number of utility functions for creating and manipulating strings, as well as other string-related stuff. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gac740e6c99bca5896ccbfc12b621491ac"></a><!-- doxytag: member="Glib::Ascii::dtostr" ref="gac740e6c99bca5896ccbfc12b621491ac" args="(double d)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::Ascii::dtostr </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>d</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts a <code>double</code> to a string, using the <code>'. </code></p>
<p>' as decimal point.</p>
<p>This functions generates enough precision that converting the string back using <a class="el" href="group__StringUtils.html#gaa44aba9faa6575d4881b1fe779464f6b" title="Converts a string to a double value.">Glib::Ascii::strtod()</a> gives the same machine-number (on machines with IEEE compatible 64bit doubles).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>d</em>&#160;</td><td>The <code>double</code> value to convert. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The converted string. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6b7e8354049756e92a97554a107618ac"></a><!-- doxytag: member="Glib::str_has_prefix" ref="ga6b7e8354049756e92a97554a107618ac" args="(const std::string &amp;str, const std::string &amp;prefix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Glib::str_has_prefix </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>prefix</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Looks whether the string <em>str</em> begins with <em>prefix</em>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str</em>&#160;</td><td>A string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>prefix</em>&#160;</td><td>The prefix to look for. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if <em>str</em> begins with <em>prefix</em>, <code>false</code> otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="ga5c4e380ffc6617ac61ca92e203e45630"></a><!-- doxytag: member="Glib::str_has_suffix" ref="ga5c4e380ffc6617ac61ca92e203e45630" args="(const std::string &amp;str, const std::string &amp;suffix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Glib::str_has_suffix </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>suffix</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Looks whether the string <em>str</em> ends with <em>suffix</em>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str</em>&#160;</td><td>A string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>suffix</em>&#160;</td><td>The suffix to look for. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if <em>str</em> ends with <em>suffix</em>, <code>false</code> otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="ga85cd83bd40baf0119aac3ff0a9a5e7b2"></a><!-- doxytag: member="Glib::strcompress" ref="ga85cd83bd40baf0119aac3ff0a9a5e7b2" args="(const std::string &amp;source)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::strcompress </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>source</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Replaces all escaped characters with their one byte equivalent. </p>
<p>This function does the reverse conversion of <a class="el" href="group__StringUtils.html#ga35e288b5ce34cb15eeec907421d2b77c" title="Escapes all special characters in the string.">Glib::strescape()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&#160;</td><td>A string to compress. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A copy of <em>source</em> with all escaped characters compressed. </dd></dl>

</div>
</div>
<a class="anchor" id="ga1eb869894996c91c0f69dbff96714c71"></a><!-- doxytag: member="Glib::strerror" ref="ga1eb869894996c91c0f69dbff96714c71" args="(int errnum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::strerror </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>errnum</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a string corresponding to the given error code, e.g. <code>"no such process"</code>. </p>
<p>This function is included since not all platforms support the <code>strerror()</code> function.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>errnum</em>&#160;</td><td>The system error number. See the standard C <code>errno</code> documentation. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A string describing the error code. If the error code is unknown, <code>"unknown error (<em>&lt;errnum&gt;</em>)"</code> is returned. </dd></dl>

</div>
</div>
<a class="anchor" id="gad24f3547c8d6b3ec56d7f5805a11d6ab"></a><!-- doxytag: member="Glib::strescape" ref="gad24f3547c8d6b3ec56d7f5805a11d6ab" args="(const std::string &amp;source, const std::string &amp;exceptions)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::strescape </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>exceptions</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Escapes all special characters in the string. </p>
<p>Escapes the special characters <code>'\b'</code>, <code>'\f'</code>, <code>'\n'</code>, <code>'\r'</code>, <code>'\t'</code>, <code>'\'</code> and <code>''</code> in the string <em>source</em> by inserting a <code>'\'</code> before them. Additionally all characters in the range <code>0x01</code>&#160;-&#160;<code>0x1F</code> (everything below <code>SPACE</code>) and in the range <code>0x80</code>&#160;-&#160;<code>0xFF</code> (all non-ASCII chars) are replaced with a <code>'\'</code> followed by their octal representation. Characters supplied in <em>exceptions</em> are not escaped.</p>
<p><a class="el" href="group__StringUtils.html#ga85cd83bd40baf0119aac3ff0a9a5e7b2" title="Replaces all escaped characters with their one byte equivalent.">Glib::strcompress()</a> does the reverse conversion.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&#160;</td><td>A string to escape. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>exceptions</em>&#160;</td><td>A string of characters not to escape in <em>source</em>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A copy of <em>source</em> with certain characters escaped. See above. </dd></dl>

</div>
</div>
<a class="anchor" id="ga35e288b5ce34cb15eeec907421d2b77c"></a><!-- doxytag: member="Glib::strescape" ref="ga35e288b5ce34cb15eeec907421d2b77c" args="(const std::string &amp;source)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::strescape </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>source</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Escapes all special characters in the string. </p>
<p>Escapes the special characters <code>'\b'</code>, <code>'\f'</code>, <code>'\n'</code>, <code>'\r'</code>, <code>'\t'</code>, <code>'\'</code> and <code>''</code> in the string <em>source</em> by inserting a <code>'\'</code> before them. Additionally all characters in the range <code>0x01</code>&#160;-&#160;<code>0x1F</code> (everything below <code>SPACE</code>) and in the range <code>0x80</code>&#160;-&#160;<code>0xFF</code> (all non-ASCII chars) are replaced with a <code>'\'</code> followed by their octal representation.</p>
<p><a class="el" href="group__StringUtils.html#ga85cd83bd40baf0119aac3ff0a9a5e7b2" title="Replaces all escaped characters with their one byte equivalent.">Glib::strcompress()</a> does the reverse conversion.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&#160;</td><td>A string to escape. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A copy of <em>source</em> with certain characters escaped. See above. </dd></dl>

</div>
</div>
<a class="anchor" id="ga44ce9f689aff8abe1e3073b209f360d3"></a><!-- doxytag: member="Glib::strsignal" ref="ga44ce9f689aff8abe1e3073b209f360d3" args="(int signum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::strsignal </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>signum</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a string describing the given signal, e.g. <code>"Segmentation fault"</code>. </p>
<p>This function is included since not all platforms support the <code>strsignal()</code> function.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>signum</em>&#160;</td><td>The signal number. See the <code>signal()</code> documentation. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A string describing the signal. If the signal is unknown, <code>"unknown signal (<em>&lt;signum&gt;</em>)"</code> is returned. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6465a8320d790115c41a2c76d1d3233c"></a><!-- doxytag: member="Glib::Ascii::strtod" ref="ga6465a8320d790115c41a2c76d1d3233c" args="(const std::string &amp;str, std::string::size_type &amp;end_index, std::string::size_type start_index=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Glib::Ascii::strtod </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string::size_type &amp;&#160;</td>
          <td class="paramname"> <em>end_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string::size_type&#160;</td>
          <td class="paramname"> <em>start_index</em> = <code>0</code></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts a string to a <code>double</code> value. </p>
<p>This function behaves like the standard <code>strtod()</code> function does in the C&#160;locale. It does this without actually changing the current locale, since that would not be thread-safe.</p>
<p>This function is typically used when reading configuration files or other non-user input that should be locale independent. To handle input from the user you should normally use locale-sensitive C++ streams.</p>
<p>To convert from a string to <code>double</code> in a locale-insensitive way, use <a class="el" href="group__StringUtils.html#gac740e6c99bca5896ccbfc12b621491ac" title="Converts a double to a string, using the &#39;.">Glib::Ascii::dtostr()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str</em>&#160;</td><td>The string to convert to a numeric value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start_index</em>&#160;</td><td>The index of the first character that should be used in the conversion. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>end_index</em>&#160;</td><td>The index of the character after the last character used in the conversion. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <code>double</code> value. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00510.html">std::out_of_range</a></em>&#160;</td><td>Thrown if <em>start_index</em> is out of range. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00512.html">std::overflow_error</a></em>&#160;</td><td>Thrown if the correct value would cause overflow. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00587.html">std::underflow_error</a></em>&#160;</td><td>Thrown if the correct value would cause underflow. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa44aba9faa6575d4881b1fe779464f6b"></a><!-- doxytag: member="Glib::Ascii::strtod" ref="gaa44aba9faa6575d4881b1fe779464f6b" args="(const std::string &amp;str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Glib::Ascii::strtod </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"> <em>str</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts a string to a <code>double</code> value. </p>
<p>This function behaves like the standard <code>strtod()</code> function does in the C&#160;locale. It does this without actually changing the current locale, since that would not be thread-safe.</p>
<p>This function is typically used when reading configuration files or other non-user input that should be locale independent. To handle input from the user you should normally use locale-sensitive C++ streams.</p>
<p>To convert from a string to <code>double</code> in a locale-insensitive way, use <a class="el" href="group__StringUtils.html#gac740e6c99bca5896ccbfc12b621491ac" title="Converts a double to a string, using the &#39;.">Glib::Ascii::dtostr()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str</em>&#160;</td><td>The string to convert to a numeric value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The <code>double</code> value. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00512.html">std::overflow_error</a></em>&#160;</td><td>Thrown if the correct value would cause overflow. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00587.html">std::underflow_error</a></em>&#160;</td><td>Thrown if the correct value would cause underflow. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Mon Sep 21 11:07:19 2009 for glibmm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>