Liquid Script: Convert string to number in order to display as money
<p>I'm trying to display a floating point value as money in liquid script. It appears to only allow you to do this to numbers, however I can't convert a string to a number (despite following advice on SO as below:)</p>

<pre><code>{% assign teststring = '202.2400' %}
{% assign testnumeric = 202.2400 %}
teststring: {{ teststring }} &lt;br/&gt;
testnumeric: {{ testnumeric }} &lt;br/&gt;

teststring as money: {{ teststring |money: "GBP" }} &lt;br/&gt;
testnumeric as money: {{ testnumeric |money: "GBP" }} &lt;br/&gt;

{% assign testStringAsNumeric = teststring | plus: 45 %}
test convert teststring to numeric: {{ testStringAsNumeric }} &lt;br/&gt;
test show above as money: {{ testStringAsNumeric |money: "GBP" }}
</code></pre>

<p>The output is: </p>

<pre><code>teststring: 202.2400 
testnumeric: 202.24 
teststring as money: 202.2400 
testnumeric as money: £202.24 
test convert teststring to numeric: 202.24000 
test show above as money: 202.24000
</code></pre>

<p>What I want is to show the string value (teststring) as money. So I need to convert to a number and then display as money.</p>

<p>I've also tried the times filter e.g.</p>

<pre><code>{% assign testStringAsNumeric = teststring | times: 1 %}
</code></pre>

<p>test show above as money: {{ testStringAsNumeric |money: "GBP" }}</p>

<p>But this returns an error:</p>

<pre><code>test show above as money: System.Linq.Enumerable+d__112`1[System.String]
</code></pre>

<p>Thanks for any help</p>