tuple_find_firstTupleFindFirstTupleFindFirsttuple_find_firsttuple_find_first
説明
tuple_find_firstTupleFindFirstTupleFindFirsttuple_find_firsttuple_find_first — 他の tuple 内にある tuple の最初の出現のインデックスを返す。
書式
tuple_find_first( tuple Tuple, tuple ToFind, out integer Index )void TupleFindFirst( const HTuple& Tuple, const HTuple& ToFind, HTuple* Index )static void HOperatorSet.TupleFindFirst( HTuple tuple, HTuple toFind, out HTuple index )def tuple_find_first( tuple: MaybeSequence[Union[int, float, str]], to_find: MaybeSequence[Union[int, float, str]] ) -> int
Herror tuple_find_first( const Hlong Tuple, const Hlong ToFind, Hlong* Index )
Herror T_tuple_find_first( const Htuple Tuple, const Htuple ToFind, Htuple* Index )
HTuple HTuple::TupleFindFirst( const HTuple& ToFind ) const
HTuple HTuple.TupleFindFirst( HTuple toFind )
説明
tuple_find_firstTupleFindFirst は、Tupletupletuple 内で 2 つ目の tuple
ToFindtoFindto_find の値の最初の出現を前方検索し、1 つ目の入力 tuple
Tupletupletuple に関連した Indexindexindex を返します。例えば、もし
Tupletupletuple が [3,4,5,6,1,2,3,4,0] で ToFindtoFindto_find が [3,4]
であった場合、出力 Indexindexindex は 0 となります。もし 1 つ目の
tuple が 2 つ目の tuple を含まない場合、tuple_find_firstTupleFindFirst
returns -1 in Indexindexindex は -1 となります。入力 tuples には数
字と文字が混在しても構いません。
例外: 入力tuple が 空
どちらかの、または両方の入力tupleが空の場合、この関数は空のtupleを返します。
HDevelopインライン演算
HDevelopは tuple_find_firstTupleFindFirst の代わりとなるインライン演算を備えており、以下の構文形式で使
用することができます::
Index := find_first(Tuple, ToFind)
実行情報
実行情報
パラメーター
Tupletupletuple (input_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)MaybeSequence[Union[int, float, str]]Htuple (Hlong / double / char*)
調べる入力 tuple
ToFindtoFindto_find (input_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)MaybeSequence[Union[int, float, str]]Htuple (Hlong / double / char*)
検索する値を含む入力 tuple
Indexindexindex (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)
検索する値の最初の出現のインデックス
他のオペレーターとの組み合わせ
組み合わせ
他の選択候補
tuple_findTupleFind, tuple_find_lastTupleFindLast, tuple_sortTupleSort, tuple_equal_elemTupleEqualElem
モジュール
Foundation