Skip to content

tuple_ordTupleOrdTupleOrdtuple_ordtuple_ord🔗

説明🔗

tuple_ordTupleOrdTupleOrdtuple_ordtuple_ord — 長さ 1 の文字の tuple を文字列tuple へ変換する。

書式🔗

tuple_ord( string T, out integer Ord )void TupleOrd( const HTuple& T, HTuple* Ord )static void HOperatorSet.TupleOrd( HTuple t, out HTuple ord )def tuple_ord( t: MaybeSequence[str] ) -> Sequence[int]

def tuple_ord_s( t: MaybeSequence[str] ) -> intHerror tuple_ord( const char* T, Hlong* Ord )

Herror T_tuple_ord( const Htuple T, Htuple* Ord )

HTuple HTuple::TupleOrd( ) const

HTuple HTuple.TupleOrd( )

説明🔗

tuple_ordTupleOrd は、長さ1の文字列のみを含む入力 tuple Ttt を整数の tuple に変換します。 HALCONライブラリで使用されるエンコーディングがUTF-8 (set_system('filename_encoding', 'utf8') 参照) であり、文字列オペレータがコードポイント(set_system('tuple_string_operator_mode', 'codepoint') 参照) で動作するように設定されている場合(両方ともデフォルト)、 オペレータはUnicode文字 (コードポイント) のUTF-8表現を受け取り、適切なUnicode文字コードを返します。 HALCONライブラリーのエンコードが 'locale'"locale" に設定されているか 文字列オペレータが 'byte'"byte" の場合、オペレータは入力文字列ごとに1バイトのみを受け入れます。 この場合、オペレータ tuple_ordTupleOrd は入力バイトのANSIコードを0〜256の整数値として返します。 種々のモデルと更なるエンコーディングの問題の詳細記述については、 Tuple / String Operations も参照下さい。

入力tupleが空の場合、この関数は空のtupleを返します。

HDevelopインライン演算🔗

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

Ord := ord(T)

実行情報🔗

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

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

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

パラメーター🔗

Ttt (input_control) string(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

長さ1の文字列 tuple

Ordordord (output_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

入力 tuple で渡されたUnicode文字コードまたはANSI文字コードの出力 tuple

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

組み合わせ

他の選択候補

tuple_ordsTupleOrds

関連項目

tuple_chrTupleChr, tuple_chrtTupleChrt

モジュール🔗

Foundation