<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>ParseInteger</title><revhistory><revision><revnumber>2</revnumber><date>2015-11-07 01:46:30</date><authorinitials>LKD70</authorinitials></revision><revision><revnumber>1</revnumber><date>2015-11-07 01:45:39</date><authorinitials>LKD70</authorinitials></revision></revhistory></articleinfo><section><title>ParseInteger</title><para>See also: <ulink url="http://guide.neatportal.com/wiki/ParseInteger/wiki/Math#">Math</ulink> for information of the &quot;Math&quot; class. </para><para>See also: <ulink url="http://guide.neatportal.com/wiki/ParseInteger/wiki/Strings#">Strings</ulink> for information of the &quot;Strings&quot; class. </para><para><emphasis><emphasis role="strong">usage:</emphasis></emphasis> </para><screen><![CDATA[ParseInteger("numerical String", Minimum value, [optional max value], [optional string end value])]]></screen><para>Returns a number found in a string if the number meets all the criteria (more than or equal to min, less than or equal to max [if specified], and ending in string end value [if specified]). This could be used to extract a number from a string. </para><para><emphasis><emphasis role="strong">examples:</emphasis></emphasis> </para><screen><![CDATA[echo ParseInteger("40", 50)]]></screen><para>Will return: 40 because it found the number 40 in the string and the number is less than 50. </para><screen><![CDATA[echo ParseInteger("40s", 0, 40, "s")]]></screen><para>Will return: 40 because it found a number 40 in the string, the number 40 is more than 0 but less than or equal to 40 and ends in &quot;s&quot;. </para><screen><![CDATA[echo ParseInteger("50s", 0, 100)]]></screen><para>Will return: -1 because the string is not a number </para><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="http://guide.neatportal.com/wiki/ParseInteger/wiki/CategoryFunctions#">CategoryFunctions</ulink> </para></section></article>