How to convert a location in Degrees Minutes Seconds represented as a String to Double
<p>My app lets users search a location and one of the queries I got was </p>

<pre><code>"78°14'09"N 15°29'29"E"
</code></pre>

<p>Obviously the user wants to go to this location.
First how do I check if this string fits the decimal format correctly. Then how do I convert it to double format?</p>

<pre><code>double latitude = convertToDouble("78°14'09"N")
</code></pre>

<p>I searched here on stackoverflow but they are all looking for the opposite: double to decimal.</p>