Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 3b996fe272685bfa229e6a8dcb542001 > files > 1006

glibmm2.4-doc-2.60.0-1.mga7.noarch.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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>glibmm: String Utility Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">glibmm
   &#160;<span id="projectnumber">2.60.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <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 class="current"><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><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">String Utility Functions</div>  </div>
</div><!--header-->
<div class="contents">

<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 class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga6b7e8354049756e92a97554a107618ac"><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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; prefix)</td></tr>
<tr class="memdesc:ga6b7e8354049756e92a97554a107618ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Looks whether the string <em>str</em> begins with <em>prefix</em>.  <a href="group__StringUtils.html#ga6b7e8354049756e92a97554a107618ac">More...</a><br /></td></tr>
<tr class="separator:ga6b7e8354049756e92a97554a107618ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c4e380ffc6617ac61ca92e203e45630"><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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; suffix)</td></tr>
<tr class="memdesc:ga5c4e380ffc6617ac61ca92e203e45630"><td class="mdescLeft">&#160;</td><td class="mdescRight">Looks whether the string <em>str</em> ends with <em>suffix</em>.  <a href="group__StringUtils.html#ga5c4e380ffc6617ac61ca92e203e45630">More...</a><br /></td></tr>
<tr class="separator:ga5c4e380ffc6617ac61ca92e203e45630"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa44aba9faa6575d4881b1fe779464f6b"><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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str)</td></tr>
<tr class="memdesc:gaa44aba9faa6575d4881b1fe779464f6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a string to a <code>double</code> value.  <a href="group__StringUtils.html#gaa44aba9faa6575d4881b1fe779464f6b">More...</a><br /></td></tr>
<tr class="separator:gaa44aba9faa6575d4881b1fe779464f6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6465a8320d790115c41a2c76d1d3233c"><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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; str, std::string::size_type&amp; end_index, std::string::size_type start_index=0)</td></tr>
<tr class="memdesc:ga6465a8320d790115c41a2c76d1d3233c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a string to a <code>double</code> value.  <a href="group__StringUtils.html#ga6465a8320d790115c41a2c76d1d3233c">More...</a><br /></td></tr>
<tr class="separator:ga6465a8320d790115c41a2c76d1d3233c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac740e6c99bca5896ccbfc12b621491ac"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">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 class="memdesc:gac740e6c99bca5896ccbfc12b621491ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a <code>double</code> to a string, using the <code>'</code>.  <a href="group__StringUtils.html#gac740e6c99bca5896ccbfc12b621491ac">More...</a><br /></td></tr>
<tr class="separator:gac740e6c99bca5896ccbfc12b621491ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35e288b5ce34cb15eeec907421d2b77c"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; source)</td></tr>
<tr class="memdesc:ga35e288b5ce34cb15eeec907421d2b77c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Escapes all special characters in the string.  <a href="group__StringUtils.html#ga35e288b5ce34cb15eeec907421d2b77c">More...</a><br /></td></tr>
<tr class="separator:ga35e288b5ce34cb15eeec907421d2b77c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad24f3547c8d6b3ec56d7f5805a11d6ab"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; source, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; exceptions)</td></tr>
<tr class="memdesc:gad24f3547c8d6b3ec56d7f5805a11d6ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Escapes all special characters in the string.  <a href="group__StringUtils.html#gad24f3547c8d6b3ec56d7f5805a11d6ab">More...</a><br /></td></tr>
<tr class="separator:gad24f3547c8d6b3ec56d7f5805a11d6ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga85cd83bd40baf0119aac3ff0a9a5e7b2"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>&amp; source)</td></tr>
<tr class="memdesc:ga85cd83bd40baf0119aac3ff0a9a5e7b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replaces all escaped characters with their one byte equivalent.  <a href="group__StringUtils.html#ga85cd83bd40baf0119aac3ff0a9a5e7b2">More...</a><br /></td></tr>
<tr class="separator:ga85cd83bd40baf0119aac3ff0a9a5e7b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1eb869894996c91c0f69dbff96714c71"><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 class="memdesc:ga1eb869894996c91c0f69dbff96714c71"><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="group__StringUtils.html#ga1eb869894996c91c0f69dbff96714c71">More...</a><br /></td></tr>
<tr class="separator:ga1eb869894996c91c0f69dbff96714c71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga44ce9f689aff8abe1e3073b209f360d3"><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 class="memdesc:ga44ce9f689aff8abe1e3073b209f360d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a string describing the given signal, e.g. <code>"Segmentation fault"</code>.  <a href="group__StringUtils.html#ga44ce9f689aff8abe1e3073b209f360d3">More...</a><br /></td></tr>
<tr class="separator:ga44ce9f689aff8abe1e3073b209f360d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">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>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gac740e6c99bca5896ccbfc12b621491ac"></a>
<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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::Ascii::dtostr </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>The <code>double</code> value to convert. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The converted string. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6b7e8354049756e92a97554a107618ac"></a>
<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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>prefix</em>&#160;</td>
        </tr>
        <tr>
          <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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>A string. </td></tr>
    <tr><td class="paramname">prefix</td><td>The prefix to look for. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</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>
<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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>suffix</em>&#160;</td>
        </tr>
        <tr>
          <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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>A string. </td></tr>
    <tr><td class="paramname">suffix</td><td>The suffix to look for. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</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>
<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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::strcompress </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>A string to compress. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A copy of <em>source</em> with all escaped characters compressed. </dd></dl>

</div>
</div>
<a class="anchor" id="ga1eb869894996c91c0f69dbff96714c71"></a>
<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>)</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">errnum</td><td>The system error number. See the standard C <code>errno</code> documentation. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A string describing the error code. If the error code is unknown, <code>&quot;unknown error (<em>&lt;errnum&gt;</em>)&quot;</code> is returned. </dd></dl>

</div>
</div>
<a class="anchor" id="ga35e288b5ce34cb15eeec907421d2b77c"></a>
<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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::strescape </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>source</em></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.</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>A string to escape. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A copy of <em>source</em> with certain characters escaped. See above. </dd></dl>

</div>
</div>
<a class="anchor" id="gad24f3547c8d6b3ec56d7f5805a11d6ab"></a>
<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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> Glib::strescape </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>exceptions</em>&#160;</td>
        </tr>
        <tr>
          <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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>A string to escape. </td></tr>
    <tr><td class="paramname">exceptions</td><td>A string of characters not to escape in <em>source</em>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A copy of <em>source</em> with certain characters escaped. See above. </dd></dl>

</div>
</div>
<a class="anchor" id="ga44ce9f689aff8abe1e3073b209f360d3"></a>
<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>)</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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">signum</td><td>The signal number. See the <code>signal()</code> documentation. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A string describing the signal. If the signal is unknown, <code>&quot;unknown signal (<em>&lt;signum&gt;</em>)&quot;</code> is returned. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa44aba9faa6575d4881b1fe779464f6b"></a>
<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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>str</em></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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>The string to convert to a numeric value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The <code>double</code> value. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a02928.html">std::overflow_error</a></td><td>Thrown if the correct value would cause overflow. </td></tr>
    <tr><td class="paramname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a02932.html">std::underflow_error</a></td><td>Thrown if the correct value would cause underflow. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga6465a8320d790115c41a2c76d1d3233c"></a>
<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/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">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>&#160;</td>
        </tr>
        <tr>
          <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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">str</td><td>The string to convert to a numeric value. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">start_index</td><td>The index of the first character that should be used in the conversion. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">end_index</td><td>The index of the character after the last character used in the conversion. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The <code>double</code> value. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a02916.html">std::out_of_range</a></td><td>Thrown if <em>start_index</em> is out of range. </td></tr>
    <tr><td class="paramname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a02928.html">std::overflow_error</a></td><td>Thrown if the correct value would cause overflow. </td></tr>
    <tr><td class="paramname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a02932.html">std::underflow_error</a></td><td>Thrown if the correct value would cause underflow. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 19 2019 09:56:38 for glibmm by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>