<html>
<head>
<title>firstworks   Programming with Rudiments using the parameterstring class</title>
<link href="../css/styles.css" rel="stylesheet">
</head>
<body>

<span class="heading">Using the parameterstring class</span><br><br>

<p>Sometimes a function needs to take an arbitrary set of parameters.  For
example, a function for connecting to a database may need host, port, socket,
username and password, any of which could be omitted depending on the
database.  Though C++ support methods which take an arbitrary number of
parameters, sometimes it is more convenient to for the method to accept a
single string parameter with name/value pairs in it instead.</p>

<p>The parameterstring class provides methods for parsing and accessing
a parameter string of the following form:</p>

<blockquote>
name1='value1';name2='value2';name3='value3'
</blockquote>

<p>The single quotes are optional.  If a parameter needs to contain a single
quote, then it can be escaped as follows:</p>

<blockquote>
name='\'value\''
</blockquote>

<p>Backslashes can be similarly escaped:</p>

<blockquote>
name='\\value\\'
</blockquote>

<img src="../images/traffic_cone.png"/>

<p>Coming soon...</p>

<blockquote class="code">
@parameterstring.cpp.html@
</blockquote>

</body>
</html>
