aboutsummaryrefslogtreecommitdiff
path: root/21.11/namespacearmnn_1_1string_utils.xhtml
diff options
context:
space:
mode:
authorNikhil Raj <nikhil.raj@arm.com>2021-11-17 13:16:45 +0000
committerNikhil Raj <nikhil.raj@arm.com>2021-11-17 13:16:45 +0000
commit9aed8fb43441228343b925b42464a55042c47ca0 (patch)
tree4c34534eea1c8e82655ac1f60e3633b9618cc40d /21.11/namespacearmnn_1_1string_utils.xhtml
parentf86be93b7492b381370cae7bf71eca8572a0cbae (diff)
downloadarmnn-9aed8fb43441228343b925b42464a55042c47ca0.tar.gz
IVGCVSW-6040 Update 21.11 Doxygen Documents
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: Ia36ec98c4bebc27a69103911ea3409cd7db587a5
Diffstat (limited to '21.11/namespacearmnn_1_1string_utils.xhtml')
-rw-r--r--21.11/namespacearmnn_1_1string_utils.xhtml506
1 files changed, 506 insertions, 0 deletions
diff --git a/21.11/namespacearmnn_1_1string_utils.xhtml b/21.11/namespacearmnn_1_1string_utils.xhtml
new file mode 100644
index 0000000000..e7d02614e4
--- /dev/null
+++ b/21.11/namespacearmnn_1_1string_utils.xhtml
@@ -0,0 +1,506 @@
+<!-- Copyright (c) 2020 ARM Limited. -->
+<!-- -->
+<!-- SPDX-License-Identifier: MIT -->
+<!-- -->
+<!-- HTML header for doxygen 1.8.13-->
+<!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.13"/>
+<meta name="robots" content="NOINDEX, NOFOLLOW" />
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>ArmNN: armnn::stringUtils Namespace Reference</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="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+ $(document).ready(initResizable);
+</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ extensions: ["tex2jax.js"],
+ jax: ["input/TeX","output/HTML-CSS"],
+});
+</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="stylesheet.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;">
+ <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/>
+ <td style="padding-left: 0.5em;">
+ <div id="projectname">
+ &#160;<span id="projectnumber">21.11</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+ <div id="nav-tree">
+ <div id="nav-tree-contents">
+ <div id="nav-sync" class="sync"></div>
+ </div>
+ </div>
+ <div id="splitbar" style="-moz-user-select:none;"
+ class="ui-resizable-handle">
+ </div>
+</div>
+<script type="text/javascript">
+$(document).ready(function(){initNavTree('namespacearmnn_1_1string_utils.xhtml','');});
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="summary">
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle">
+<div class="title">armnn::stringUtils Namespace Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a25545ea8edf6a26c00077b01294beac5"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_1_1string_utils.xhtml#a25545ea8edf6a26c00077b01294beac5">StringTokenizer</a> (const std::string &amp;str, const char *delimiters, bool tokenCompression=true)</td></tr>
+<tr class="memdesc:a25545ea8edf6a26c00077b01294beac5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to take a string and a list of delimiters and split the string into tokens based on those delimiters This assumes that tokens are also to be split by newlines Enabling tokenCompression merges adjacent delimiters together, preventing empty tokens. <a href="#a25545ea8edf6a26c00077b01294beac5">More...</a><br /></td></tr>
+<tr class="separator:a25545ea8edf6a26c00077b01294beac5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a00efcb78606c1ff19905f8fd79798963"><td class="memItemLeft" align="right" valign="top">std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_1_1string_utils.xhtml#a00efcb78606c1ff19905f8fd79798963">StringStartTrim</a> (std::string &amp;str, const std::string &amp;chars=&quot;\\\&quot;)</td></tr>
+<tr class="memdesc:a00efcb78606c1ff19905f8fd79798963"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trim from the start of a string. <a href="#a00efcb78606c1ff19905f8fd79798963">More...</a><br /></td></tr>
+<tr class="separator:a00efcb78606c1ff19905f8fd79798963"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2df931fd1927227a4af1d06dc94e6de8"><td class="memItemLeft" align="right" valign="top">std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_1_1string_utils.xhtml#a2df931fd1927227a4af1d06dc94e6de8">StringEndTrim</a> (std::string &amp;str, const std::string &amp;chars=&quot;\\\&quot;)</td></tr>
+<tr class="memdesc:a2df931fd1927227a4af1d06dc94e6de8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trim for the end of a string. <a href="#a2df931fd1927227a4af1d06dc94e6de8">More...</a><br /></td></tr>
+<tr class="separator:a2df931fd1927227a4af1d06dc94e6de8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acdeebefc9791d026eeb564f373479510"><td class="memItemLeft" align="right" valign="top">std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_1_1string_utils.xhtml#acdeebefc9791d026eeb564f373479510">StringTrim</a> (std::string &amp;str, const std::string &amp;chars=&quot;\\\&quot;)</td></tr>
+<tr class="memdesc:acdeebefc9791d026eeb564f373479510"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trim from both the start and the end of a string. <a href="#acdeebefc9791d026eeb564f373479510">More...</a><br /></td></tr>
+<tr class="separator:acdeebefc9791d026eeb564f373479510"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac5da14c1462870eef77ca8ac4bb5afe5"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_1_1string_utils.xhtml#ac5da14c1462870eef77ca8ac4bb5afe5">StringTrimCopy</a> (const std::string &amp;str, const std::string &amp;chars=&quot;\\\&quot;)</td></tr>
+<tr class="memdesc:ac5da14c1462870eef77ca8ac4bb5afe5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trim from both the start and the end of a string, returns a trimmed copy of the string. <a href="#ac5da14c1462870eef77ca8ac4bb5afe5">More...</a><br /></td></tr>
+<tr class="separator:ac5da14c1462870eef77ca8ac4bb5afe5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad5a6f63805c2ed95034fdf2f8dc91fd2"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_1_1string_utils.xhtml#ad5a6f63805c2ed95034fdf2f8dc91fd2">StringConcat</a> (const std::vector&lt; std::string &gt; &amp;strings, std::string seperator=&quot;&quot;)</td></tr>
+<tr class="memdesc:ad5a6f63805c2ed95034fdf2f8dc91fd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Takes a vector of strings and concatenates them together into one long std::string with an optional seperator between each. <a href="#ad5a6f63805c2ed95034fdf2f8dc91fd2">More...</a><br /></td></tr>
+<tr class="separator:ad5a6f63805c2ed95034fdf2f8dc91fd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4d846a2c84e89c81b5ccc20119a466dd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_1_1string_utils.xhtml#a4d846a2c84e89c81b5ccc20119a466dd">StringReplaceAll</a> (std::string &amp;str, const std::string &amp;oldStr, const std::string &amp;newStr)</td></tr>
+<tr class="memdesc:a4d846a2c84e89c81b5ccc20119a466dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterates over a given str and replaces all instance of substring oldStr with newStr. <a href="#a4d846a2c84e89c81b5ccc20119a466dd">More...</a><br /></td></tr>
+<tr class="separator:a4d846a2c84e89c81b5ccc20119a466dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9a85377a37e25f2dd47a4a922691d54c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_1_1string_utils.xhtml#a9a85377a37e25f2dd47a4a922691d54c">StringToBool</a> (const std::string &amp;s, bool throw_on_error=true)</td></tr>
+<tr class="memdesc:a9a85377a37e25f2dd47a4a922691d54c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a string to bool. <a href="#a9a85377a37e25f2dd47a4a922691d54c">More...</a><br /></td></tr>
+<tr class="separator:a9a85377a37e25f2dd47a4a922691d54c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ad5a6f63805c2ed95034fdf2f8dc91fd2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad5a6f63805c2ed95034fdf2f8dc91fd2">&#9670;&nbsp;</a></span>StringConcat()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::string armnn::stringUtils::StringConcat </td>
+ <td>(</td>
+ <td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
+ <td class="paramname"><em>strings</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">std::string&#160;</td>
+ <td class="paramname"><em>seperator</em> = <code>&quot;&quot;</code>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p>Takes a vector of strings and concatenates them together into one long std::string with an optional seperator between each. </p>
+
+<p class="definition">Definition at line <a class="el" href="_string_utils_8hpp_source.xhtml#l00096">96</a> of file <a class="el" href="_string_utils_8hpp_source.xhtml">StringUtils.hpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;{</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; std::stringstream ss;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keywordtype">string</span> : strings)</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; {</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; ss &lt;&lt; <span class="keywordtype">string</span> &lt;&lt; seperator;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; }</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">return</span> ss.str();</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a2df931fd1927227a4af1d06dc94e6de8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2df931fd1927227a4af1d06dc94e6de8">&#9670;&nbsp;</a></span>StringEndTrim()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::string&amp; armnn::stringUtils::StringEndTrim </td>
+ <td>(</td>
+ <td class="paramtype">std::string &amp;&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>chars</em> = <code>&quot;\t\n\v\f\r&#160;&quot;</code>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p>Trim for the end of a string. </p>
+
+<p class="definition">Definition at line <a class="el" href="_string_utils_8hpp_source.xhtml#l00071">71</a> of file <a class="el" href="_string_utils_8hpp_source.xhtml">StringUtils.hpp</a>.</p>
+
+<p class="reference">Referenced by <a class="el" href="_string_utils_8hpp_source.xhtml#l00080">StringTrim()</a>, and <a class="el" href="_string_utils_8hpp_source.xhtml#l00088">StringTrimCopy()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;{</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; str.erase(str.find_last_not_of(chars) + 1);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordflow">return</span> str;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a4d846a2c84e89c81b5ccc20119a466dd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4d846a2c84e89c81b5ccc20119a466dd">&#9670;&nbsp;</a></span>StringReplaceAll()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">void armnn::stringUtils::StringReplaceAll </td>
+ <td>(</td>
+ <td class="paramtype">std::string &amp;&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>oldStr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>newStr</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p>Iterates over a given str and replaces all instance of substring oldStr with newStr. </p>
+
+<p class="definition">Definition at line <a class="el" href="_string_utils_8hpp_source.xhtml#l00109">109</a> of file <a class="el" href="_string_utils_8hpp_source.xhtml">StringUtils.hpp</a>.</p>
+<div class="fragment"><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;{</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; std::string::size_type pos = 0u;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordflow">while</span> ((pos = str.find(oldStr, pos)) != std::string::npos)</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; str.replace(pos, oldStr.length(), newStr);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; pos += newStr.length();</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; }</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a00efcb78606c1ff19905f8fd79798963"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a00efcb78606c1ff19905f8fd79798963">&#9670;&nbsp;</a></span>StringStartTrim()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::string&amp; armnn::stringUtils::StringStartTrim </td>
+ <td>(</td>
+ <td class="paramtype">std::string &amp;&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>chars</em> = <code>&quot;\t\n\v\f\r&#160;&quot;</code>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p>Trim from the start of a string. </p>
+
+<p class="definition">Definition at line <a class="el" href="_string_utils_8hpp_source.xhtml#l00062">62</a> of file <a class="el" href="_string_utils_8hpp_source.xhtml">StringUtils.hpp</a>.</p>
+
+<p class="reference">Referenced by <a class="el" href="_string_utils_8hpp_source.xhtml#l00080">StringTrim()</a>, and <a class="el" href="_string_utils_8hpp_source.xhtml#l00088">StringTrimCopy()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;{</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; str.erase(0, str.find_first_not_of(chars));</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordflow">return</span> str;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="a9a85377a37e25f2dd47a4a922691d54c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9a85377a37e25f2dd47a4a922691d54c">&#9670;&nbsp;</a></span>StringToBool()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool armnn::stringUtils::StringToBool </td>
+ <td>(</td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>s</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&#160;</td>
+ <td class="paramname"><em>throw_on_error</em> = <code>true</code>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p>Converts a string to bool. </p>
+<p>Accepts "true", "false" (case-insensitive) and numbers, 1 (true) or 0 (false).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">s</td><td>String to convert to bool </td></tr>
+ <tr><td class="paramname">throw_on_error</td><td>Bool variable to suppress error if conversion failed (Will return false in that case) </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>bool value </dd></dl>
+
+<p class="definition">Definition at line <a class="el" href="_string_utils_8hpp_source.xhtml#l00129">129</a> of file <a class="el" href="_string_utils_8hpp_source.xhtml">StringUtils.hpp</a>.</p>
+
+<p class="reference">Referenced by <a class="el" href="_utility_tests_8cpp_source.xhtml#l00021">TEST_SUITE()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;{</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="comment">// in case of failure to convert returns false</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keyword">auto</span> result = <span class="keyword">false</span>;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="comment">// isstringstream fails if parsing didn&#39;t work</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; std::istringstream is(s);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="comment">// try integer conversion first. For the case s is a number</span></div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; is &gt;&gt; result;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keywordflow">if</span> (is.fail())</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; {</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="comment">// transform to lower case to make case-insensitive</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; std::string s_lower = s;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; std::transform(s_lower.begin(),</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; s_lower.end(),</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; s_lower.begin(),</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; [](<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> c){ <span class="keywordflow">return</span> std::tolower(c); });</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; is.str(s_lower);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="comment">// try boolean -&gt; s=&quot;false&quot; or &quot;true&quot;</span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; is.clear();</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; is &gt;&gt; std::boolalpha &gt;&gt; result;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; }</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="keywordflow">if</span> (is.fail() &amp;&amp; throw_on_error)</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; {</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>(s + <span class="stringliteral">&quot; is not convertable to bool&quot;</span>);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; }</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="a25545ea8edf6a26c00077b01294beac5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a25545ea8edf6a26c00077b01294beac5">&#9670;&nbsp;</a></span>StringTokenizer()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::vector&lt;std::string&gt; armnn::stringUtils::StringTokenizer </td>
+ <td>(</td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>delimiters</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&#160;</td>
+ <td class="paramname"><em>tokenCompression</em> = <code>true</code>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p>Function to take a string and a list of delimiters and split the string into tokens based on those delimiters This assumes that tokens are also to be split by newlines Enabling tokenCompression merges adjacent delimiters together, preventing empty tokens. </p>
+
+<p class="definition">Definition at line <a class="el" href="_string_utils_8hpp_source.xhtml#l00023">23</a> of file <a class="el" href="_string_utils_8hpp_source.xhtml">StringUtils.hpp</a>.</p>
+
+<p class="reference">Referenced by <a class="el" href="_dynamic_backend_utils_8cpp_source.xhtml#l00101">DynamicBackendUtils::GetBackendPathsImpl()</a>, and <a class="el" href="_network_execution_utils_8hpp_source.xhtml#l00079">ParseArrayImpl()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;{</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; std::stringstream stringStream(str);</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; std::string line;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; std::vector&lt;std::string&gt; tokenVector;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keywordflow">while</span> (std::getline(stringStream, line))</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; {</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; std::size_t prev = 0;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; std::size_t pos;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keywordflow">while</span> ((pos = line.find_first_of(delimiters, prev)) != std::string::npos)</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; {</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="comment">// Ignore adjacent tokens</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keywordflow">if</span> (pos &gt; prev)</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; tokenVector.push_back(line.substr(prev, pos - prev));</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; }</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="comment">// Unless token compression is disabled</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!tokenCompression)</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; {</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; tokenVector.push_back(line.substr(prev, pos - prev));</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; }</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; prev = pos + 1;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; }</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keywordflow">if</span> (prev &lt; line.length())</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; tokenVector.push_back(line.substr(prev, std::string::npos));</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; }</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; }</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordflow">return</span> tokenVector;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;}</div></div><!-- fragment -->
+</div>
+</div>
+<a id="acdeebefc9791d026eeb564f373479510"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acdeebefc9791d026eeb564f373479510">&#9670;&nbsp;</a></span>StringTrim()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::string&amp; armnn::stringUtils::StringTrim </td>
+ <td>(</td>
+ <td class="paramtype">std::string &amp;&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>chars</em> = <code>&quot;\t\n\v\f\r&#160;&quot;</code>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p>Trim from both the start and the end of a string. </p>
+
+<p class="definition">Definition at line <a class="el" href="_string_utils_8hpp_source.xhtml#l00080">80</a> of file <a class="el" href="_string_utils_8hpp_source.xhtml">StringUtils.hpp</a>.</p>
+
+<p class="reference">References <a class="el" href="_string_utils_8hpp_source.xhtml#l00071">StringEndTrim()</a>, and <a class="el" href="_string_utils_8hpp_source.xhtml#l00062">StringStartTrim()</a>.</p>
+
+<p class="reference">Referenced by <a class="el" href="_json_printer_test_impl_8cpp_source.xhtml#l00051">ExtractMeasurements()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;{</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearmnn_1_1string_utils.xhtml#a00efcb78606c1ff19905f8fd79798963">StringStartTrim</a>(<a class="code" href="namespacearmnn_1_1string_utils.xhtml#a2df931fd1927227a4af1d06dc94e6de8">StringEndTrim</a>(str, chars), chars);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;}</div><div class="ttc" id="namespacearmnn_1_1string_utils_xhtml_a2df931fd1927227a4af1d06dc94e6de8"><div class="ttname"><a href="namespacearmnn_1_1string_utils.xhtml#a2df931fd1927227a4af1d06dc94e6de8">armnn::stringUtils::StringEndTrim</a></div><div class="ttdeci">std::string &amp; StringEndTrim(std::string &amp;str, const std::string &amp;chars=&quot;\\\&quot;)</div><div class="ttdoc">Trim for the end of a string. </div><div class="ttdef"><b>Definition:</b> <a href="_string_utils_8hpp_source.xhtml#l00071">StringUtils.hpp:71</a></div></div>
+<div class="ttc" id="namespacearmnn_1_1string_utils_xhtml_a00efcb78606c1ff19905f8fd79798963"><div class="ttname"><a href="namespacearmnn_1_1string_utils.xhtml#a00efcb78606c1ff19905f8fd79798963">armnn::stringUtils::StringStartTrim</a></div><div class="ttdeci">std::string &amp; StringStartTrim(std::string &amp;str, const std::string &amp;chars=&quot;\\\&quot;)</div><div class="ttdoc">Trim from the start of a string. </div><div class="ttdef"><b>Definition:</b> <a href="_string_utils_8hpp_source.xhtml#l00062">StringUtils.hpp:62</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a id="ac5da14c1462870eef77ca8ac4bb5afe5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac5da14c1462870eef77ca8ac4bb5afe5">&#9670;&nbsp;</a></span>StringTrimCopy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+ <tr>
+ <td class="mlabels-left">
+ <table class="memname">
+ <tr>
+ <td class="memname">std::string armnn::stringUtils::StringTrimCopy </td>
+ <td>(</td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const std::string &amp;&#160;</td>
+ <td class="paramname"><em>chars</em> = <code>&quot;\t\n\v\f\r&#160;&quot;</code>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+ </td>
+ <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">inline</span></span> </td>
+ </tr>
+</table>
+</div><div class="memdoc">
+
+<p>Trim from both the start and the end of a string, returns a trimmed copy of the string. </p>
+
+<p class="definition">Definition at line <a class="el" href="_string_utils_8hpp_source.xhtml#l00088">88</a> of file <a class="el" href="_string_utils_8hpp_source.xhtml">StringUtils.hpp</a>.</p>
+
+<p class="reference">References <a class="el" href="_string_utils_8hpp_source.xhtml#l00071">StringEndTrim()</a>, and <a class="el" href="_string_utils_8hpp_source.xhtml#l00062">StringStartTrim()</a>.</p>
+
+<p class="reference">Referenced by <a class="el" href="_execute_network_program_options_8cpp_source.xhtml#l00442">ProgramOptions::ParseOptions()</a>, and <a class="el" href="_network_execution_utils_8cpp_source.xhtml#l00108">ParseStringList()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;{</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; std::string strCopy = str;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearmnn_1_1string_utils.xhtml#a00efcb78606c1ff19905f8fd79798963">StringStartTrim</a>(<a class="code" href="namespacearmnn_1_1string_utils.xhtml#a2df931fd1927227a4af1d06dc94e6de8">StringEndTrim</a>(strCopy, chars), chars);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;}</div><div class="ttc" id="namespacearmnn_1_1string_utils_xhtml_a2df931fd1927227a4af1d06dc94e6de8"><div class="ttname"><a href="namespacearmnn_1_1string_utils.xhtml#a2df931fd1927227a4af1d06dc94e6de8">armnn::stringUtils::StringEndTrim</a></div><div class="ttdeci">std::string &amp; StringEndTrim(std::string &amp;str, const std::string &amp;chars=&quot;\\\&quot;)</div><div class="ttdoc">Trim for the end of a string. </div><div class="ttdef"><b>Definition:</b> <a href="_string_utils_8hpp_source.xhtml#l00071">StringUtils.hpp:71</a></div></div>
+<div class="ttc" id="namespacearmnn_1_1string_utils_xhtml_a00efcb78606c1ff19905f8fd79798963"><div class="ttname"><a href="namespacearmnn_1_1string_utils.xhtml#a00efcb78606c1ff19905f8fd79798963">armnn::stringUtils::StringStartTrim</a></div><div class="ttdeci">std::string &amp; StringStartTrim(std::string &amp;str, const std::string &amp;chars=&quot;\\\&quot;)</div><div class="ttdoc">Trim from the start of a string. </div><div class="ttdef"><b>Definition:</b> <a href="_string_utils_8hpp_source.xhtml#l00062">StringUtils.hpp:62</a></div></div>
+</div><!-- fragment -->
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+ <ul>
+ <li class="navelem"><a class="el" href="namespacearmnn.xhtml">armnn</a></li><li class="navelem"><a class="el" href="namespacearmnn_1_1string_utils.xhtml">stringUtils</a></li>
+ <li class="footer">Generated on Wed Nov 17 2021 12:59:46 for ArmNN by
+ <a href="http://www.doxygen.org/index.html">
+ <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
+ </ul>
+</div>
+</body>
+</html>