<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqutil">
<Function File="../../src/liblqutil/range.c">
<Name>LQU_NumberWithinRange</Name>
<Class>Utilities/Numeric Range
<Purpose>
Determine whether a given number, n, falls within a given range.
<P>A range is a list like `-4,12-30,40,100-', to match</P>
<P>1, 2, 3, 4, 12, 13...29, 30, 40, 100, 101, 102, ...</P>
<P>A space can be used instead of a comma.  The range "all"
generates the range `-1,2-', matching all numbers</P>
<Returns>
<LIST>
<LI>1 if the n is within (matched by) the given range
<LI>0 otherwise
</LIST>
<SeeAlso>
LQU_StringToRange
LQU_LargerThanRangeTop
</Function>
<Decl>
API int
LQU_NumberWithinRange(n, Range)
    CONST int n;
    CONST t_Range *Range;
</Decl>
</Entry>
