<div dir="ltr">Hello,<div><br></div><div>It would be great if we had `<span style="color:rgb(51,51,51);font-size:12px;white-space:pre-wrap">init?(_ text: </span><span class="inbox-code-object" style="font-size:12px;white-space:pre-wrap;color:rgb(145,0,145)">String</span><span style="color:rgb(51,51,51);font-size:12px;white-space:pre-wrap">)</span>` for Bool class. Because sometime when you're processing JSON/XML it can help you a lot.</div><div><br></div><div>Examples:</div><div><br></div><div><pre class="inbox-code-java" style="margin-top:0px;margin-bottom:0px;padding:0px;max-height:30em;overflow:auto;white-space:pre-wrap;word-wrap:normal;color:rgb(51,51,51);font-size:12px">Bool(<span class="inbox-code-quote" style="color:rgb(0,145,0)">"<span class="inbox-code-keyword">true</span>"</span>) -> <span class="inbox-code-keyword" style="color:rgb(0,0,145)">true</span>
Bool(<span class="inbox-code-quote" style="color:rgb(0,145,0)">"<span class="inbox-code-keyword">false</span>"</span>) -> <span class="inbox-code-keyword" style="color:rgb(0,0,145)">false</span>
Bool(<span class="inbox-code-quote" style="color:rgb(0,145,0)">"TrUE"</span>) -> <span class="inbox-code-keyword" style="color:rgb(0,0,145)">true</span>
Bool(<span class="inbox-code-quote" style="color:rgb(0,145,0)">" <span class="inbox-code-keyword">true</span> "</span>) -> nil
Bool(<span class="inbox-code-quote" style="color:rgb(0,145,0)">"1"</span>) -> nil
Bool(<span class="inbox-code-quote" style="color:rgb(0,145,0)">"Y"</span>) -> nil
Bool(<span class="inbox-code-quote" style="color:rgb(0,145,0)">"whatever"</span>) -> nil </pre><pre class="inbox-code-java" style="margin-top:0px;margin-bottom:0px;padding:0px;max-height:30em;overflow:auto;white-space:pre-wrap;word-wrap:normal;color:rgb(51,51,51);font-size:12px"><br></pre><pre class="inbox-code-java" style="margin-top:0px;margin-bottom:0px;padding:0px;max-height:30em;overflow:auto;white-space:pre-wrap;word-wrap:normal;color:rgb(51,51,51);font-size:12px"><br></pre></div>via <a href="https://bugs.swift.org/browse/SR-1282">https://bugs.swift.org/browse/SR-1282</a><div><br></div><div>Thanks.</div></div>