[#ArgsManager-SoftSetArg]
= xref:ArgsManager.adoc[ArgsManager]::SoftSetArg
:relfileprefix: ../
:mrdocs:

Set an argument if it doesn&apos;t already have a value

== Synopsis

Declared in `&lt;common&sol;args&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f9524a23108)&rsqb;&rsqb;
bool
SoftSetArg(
    std::string const& strArg,
    std::string const& strValue);
----

== Return Value

true if argument gets set, false if it already had a value

== Parameters

[cols="1,4"]
|===
| Name| Description
| *strArg*
| Argument to set (e&period;g&period; &quot;&hyphen;foo&quot;)
| *strValue*
| Value (e&period;g&period; &quot;1&quot;)
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
