2%> Return ``
true``
if and only
if the input ``varval``
3%> has the specified maximum size ``maxlen``,
4%> Otherwise,
return ``
false``.
7%> This routine is primarily used within the procedures of
8%> the ParaMonte library
for type introspection and verification
9%> in high-level programming languages.<br>
11%> @param[in] varval : The input value whose length is to
verified to
12%> be less than or equal to the input value ``maxlen``.<br>
15%> <li> an input scalar
string has a length of ``1``.<br>
16%> <li> an input scalar value has a length of ``1``.<br>
17%> <li> the length of a non-scalar
object is measured
18%> by the MATLAB intrinsic ``numel()``.<br>
20%> @param[in] maxlen : The input positive scalar MATLAB integer representing the
21%> maximum allowed size of the input value ``varval``.<br>
24%> ``itis`` : The output scalar MATLAB logical that is ``
true``
if and only
if
25%> the input ``varval`` has a length that is less than or equal to
26%> the specified maximum size ``maxlen``, otherwise, it is ``
false``.<br>
31%> itis = pm.introspection.islenleq(varval, maxlen)
36%> [pm.introspection.verify](@ref
verify)<br>
37%> [pm.introspection.verified](@ref
verified)<br>
38%> [pm.introspection.islenleq](@ref
islenleq)<br>
39%> [pm.introspection.istype](@ref
istype)<br>
42%> \include{lineno} example/introspection/
islenleq/main.m
44%> \include{lineno} example/introspection/
islenleq/main.out.m
49%> \JoshuaOsborne, May 21 2024, 5:47 PM, University of Texas at Arlington<br>
50%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
51%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
54 varval = string(varval);
56 itis = numel(varval) <= maxlen;
function verify(in varval, in vartype, in maxlen, in varname)
Verify the type and number of elements of the input varval match the specified input vartype and maxl...
function islenleq(in varval, in maxlen)
Return true if and only if the input varval has the specified maximum size maxlen,...
function istype(in varval, in vartype)
Return true if and only if the input varval conforms with the specified input type vartype,...
function verified(in varval, in vartype, in maxlen)
Return true if and only if the input varval conforms with the specified input type vartype and maximu...