Skip to content

tuple_str_bit_selectTupleStrBitSelectTupleStrBitSelecttuple_str_bit_selecttuple_str_bit_select🔗

説明🔗

tuple_str_bit_selectTupleStrBitSelectTupleStrBitSelecttuple_str_bit_selecttuple_str_bit_select — tuple から1つの文字またはビットを選択する。

書式🔗

tuple_str_bit_select( tuple Tuple, integer Index, out tuple Selected )void TupleStrBitSelect( const HTuple& Tuple, const HTuple& Index, HTuple* Selected )static void HOperatorSet.TupleStrBitSelect( HTuple tuple, HTuple index, out HTuple selected )def tuple_str_bit_select( tuple: MaybeSequence[Union[str, int]], index: int ) -> Sequence[Union[str, int]]

def tuple_str_bit_select_s( tuple: MaybeSequence[Union[str, int]], index: int ) -> Union[str, int]Herror tuple_str_bit_select( const char* Tuple, const Hlong Index, char* Selected )

Herror T_tuple_str_bit_select( const Htuple Tuple, const Htuple Index, Htuple* Selected )

HTuple HTuple::TupleStrBitSelect( const HTuple& Index ) const

HTuple HTuple.TupleStrBitSelect( HTuple index )

説明🔗

tuple_str_bit_selectTupleStrBitSelect は整数かつ/または文字列の tuple Tupletupletuple から 1 つの文字またはビットを選択します。 入力パラメーター Indexindexindex は文字またはビット位置を選択するた めに定義します。Indexindexindex は 1 つの数を含まなければいけませ ん。もし Indexindexindex に浮動小数点数が含まれるなら、これは整数値 だけを表します(端数なし)。(without fraction) 結果の tuple Selectedselectedselected は Tupletupletuple の各要素に対して新しい要素を含 みます。Indexindexindex が数 “n” なら Selectedselectedselected の要素 は、対応する Tupletupletuple の要素に対して文字列の場合は ``n 番目’ ’ の文字を、整数の場合は “n 番目” のビットを含みます。

Tupletupletuple が空の場合、例外が発生します。

Unicodeコードポイントとバイト🔗

インデックスは Unicode コードポイントを参照します。 1つのUnicodeコードポイントは、UTF-8文字列の複数のバイトで構成されています。 インデックスが文字列の生のバイトを参照する必要がある場合、 このオペレータはset_system('tsp_tuple_string_operator_mode', 'byte')SetSystem("tsp_tuple_string_operator_mode", "byte")SetSystem("tsp_tuple_string_operator_mode", "byte")set_system("tsp_tuple_string_operator_mode", "byte")set_system("tsp_tuple_string_operator_mode", "byte")を使用して バイトモードに切り替えることができます。 'filename_encoding'"filename_encoding" が 'locale'"locale" (legacy) に設定されている場合、 このオペレータは常にバイトモードを使用します。 文字列操作に関する一般的な情報については、Tuple / String Operations を参照してください。

HDevelopインライン演算🔗

HDevelopは tuple_str_bit_selectTupleStrBitSelect の代わりとなるインライン演算を備えており、以下の構文形 式で使用することができます::

texttt{Selected := Tuple{Index}}

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

Tupletupletuple (input_control) tuple(-array) → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)MaybeSequence[Union[str, int]]Htuple (char* / Hlong)

入力 tuple

Indexindexindex (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

選択する文字またはビットの位置

Selectedselectedselected (output_control) tuple(-array) → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)Sequence[Union[str, int]]Htuple (char* / Hlong)

選択した文字とビットを含む tuple

他のオペレーターとの組み合わせ🔗

組み合わせ

他の選択候補

tuple_selectTupleSelect, tuple_first_nTupleFirstN, tuple_last_nTupleLastN, tuple_concatTupleConcat, tuple_strchrTupleStrchr, tuple_strrchrTupleStrrchr, tuple_str_first_nTupleStrFirstN, tuple_str_last_nTupleStrLastN, tuple_substrTupleSubstr, tuple_andTupleAnd, tuple_orTupleOr, tuple_xorTupleXor, tuple_notTupleNot

関連項目

tuple_removeTupleRemove

モジュール🔗

Foundation