user137450: I have read bitcoin.conf Configuration File which mentions: The configuration file is a plain text file and consists of option=value entries, one per line. Leading and trailing whitespaces are removed.
So which of the following are valid:

option=value
 option=value
 option =value
option=value
option = value

?
I know I can try the above options. However, that brings me to the original question: Where can I find the parser implementation of bitcoin.conf files that Bitcoin Core uses?

user48884: 
So which of the following are valid:

All of them, as the parser does trim whitespace before and after the string, and before and after both the name and value after splitting them.

However, that brings me to the original question: Where can I find the parser implementation of bitcoin.conf files that Bitcoin Core uses?

Config file handling can be found in src/util/system.cpp, with the main function being ReadConfigFiles. The options are parsed in GetConfigOptions.

137450: <p>I have read <a href="https://github.com/bitcoin/bitcoin/blob/911a40ead256b8849166cff1b745b9c9898e2da8/doc/bitcoin-conf.md" rel="nofollow noreferrer">bitcoin.conf Configuration File</a> which mentions: <em>The configuration file is a plain text file and consists of <code>option=value</code> entries, one per line. Leading and trailing whitespaces are removed.</em></p>
<p>So which of the following are valid:</p>
<ul>
<li><code>option=value</code></li>
<li><code> option=value</code></li>
<li><code> option =value</code></li>
<li><code>option=value</code></li>
<li><code>option = value</code></li>
</ul>
<p>?</p>
<p>I know I can try the above options. However, that brings me to the original question: Where can I find the parser implementation of <code>bitcoin.conf</code> files that Bitcoin Core uses?</p>
 48884: <blockquote>
<p>So which of the following are valid:</p>
</blockquote>
<p>All of them, as the parser does trim whitespace before and after the string, and before and after both the name and value after splitting them.</p>
<blockquote>
<p>However, that brings me to the original question: Where can I find the parser implementation of bitcoin.conf files that Bitcoin Core uses?</p>
</blockquote>
<p>Config file handling can be found in <code>src/util/system.cpp</code>, with the main function being <code>ReadConfigFiles</code>. The options are parsed in <code>GetConfigOptions</code>.</p>
