right , right include , right last match , right last match include
This function extracts a right part of the parameter set either with a element position number or a subset resembling a matching element.
Indirect parameter passing is disabled
Min 2
No. | Type | Description |
---|---|---|
1 input |
parameter set | input parameter set Attention: If 1st parameter is not a parameter set, please refer to right [string function] instead. |
2 input |
numeral | parameter set position Positive: Select the last n elements of the parameter set. |
Alt. 2 input |
parameter set | matching elements Function right ...: Return the right part of the parameter set without the matching element. |
Opt. 3+ io |
parameter set | follower Other parameter sets in addition to the one provided as the first function parameter can be extracted in the same same way. Add any number of additional parameter set variables. They will be manipulated at the exact same positions as the returned value. |
Type | Description |
---|---|
parameter set | Extracted subset |
set[] = { the, taste, of, the, 12, coffees, '!' };
echo( right( set[], 0 ), ", ", right( set[], 1 ), ", ", right( set[], -2 ), ", ", right( set[], -1 ) );
echo( right( set[],99 ), ", ", right( set[], -99) );
echo;
echo( right( set[], { 12, of } ), " / ", right include( set[], { 12, of } ) ); // Recognized 'of' as 1st match
echo( right last match ( set[], {the} ), ", ", right last match include( set[], {the} ) );
echo( right( set[], {tea } ) ); // Returns full set because pattern not found
echo( new line, "Demonstrate the follower feature: ");
set2[] = { A, fragrance, coming, from, 120, espressos, '!' };
set3[] = { Der, Geschmack, kommt, von, 120, Tassen Kaffee, '!' };
echo( "Extraction 1: ", right include ( set[], {the}, set2[], set3[] ) );
echo( "Extraction 2: ", set2[] );
echo( "Extraction 3: ", set3[] );
{}, {'!'}, {'of','the',12,'coffees','!'}, {'taste','of','the',12,'coffees','!'}
{'the','taste','of','the',12,'coffees','!'}, {}
{'the',12,'coffees','!'} / {'of','the',12,'coffees','!'}
{12,'coffees','!'}, {'the',12,'coffees','!'}
{'the','taste','of','the',12,'coffees','!'}
Demonstrate the follower feature:
Extraction 1: {'the','taste','of','the',12,'coffees','!'}
Extraction 2: {'A','fragrance','coming','from',120,'espressos','!'}
Extraction 3: {'Der','Geschmack','kommt','von',120,'Tassen Kaffee','!'}
left [parameter set function]
middle [parameter set function]
outside [parameter set function]
right [string function]