StopAfterMethod

Applies to:uCalc Transform
Class:uCalc.uCalcTransform.RuleClass
Sets the number of matches after which this rule should stop finding matches
Syntax
StopAfter(Value)
Parameters
Value
Int32
Number of matches after which it should stop finding matches
Returns
Type: RuleClass
Sets the number of matches after which this rule should stop finding matches
Remarks
This sets a number of individual matches that this rule should find. After this number of matches are found, all other matches for this rule are ignored. For instance if a rule searches for matches of "a" in "a a r d v a r k", and stops after 2, then only the first two letters here wil match; the third "a" (the one between "v" and "r") will not count as a match.

The default StopAfter value is -1, which means it will not stop counting matches for this rule.

This function has some similarities with Max. However, with Max, if the maximum value is not attained, none of the matches will count.

DLL import code
<DllImport(uCalcDLL, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl, EntryPoint:="StopAfter")> _

Private Function StopAfter__(ByVal RuleHandle As IntPtr,ByVal Value As Int32) As IntPtr
End Function
            
[DllImport(uCalcDLL, CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl, EntryPoint="StopAfter")]

protected static extern IntPtr StopAfter_(IntPtr RuleHandle, Int32 Value);
            
{DLLImport}function StopAfter__(RuleHandle: System.Pointer;Value: Int32): System.Pointer; cdecl; external uCalcDLL name 'StopAfter';

            
typedef uCalcPtr (* __StopAfter)(void *RuleHandle, int32_t Value); 

            
[DllImport(uCalcLib, CharSet=CharSet::Ansi, CallingConvention=CallingConvention::Cdecl, EntryPoint = "StopAfter")]

static uCalcPtr StopAfter_(void *  RuleHandle, Int32 Value);
            
See also
Prev | Next