Skip to content

tuple_chrTupleChrTupleChrtuple_chrtuple_chr🔗

Short description🔗

tuple_chrTupleChrTupleChrtuple_chrtuple_chr — Convert a tuple of integer numbers into strings.

Signature🔗

tuple_chr( integer T, out string Chr )void TupleChr( const HTuple& T, HTuple* Chr )static void HOperatorSet.TupleChr( HTuple t, out HTuple chr )def tuple_chr( t: MaybeSequence[int] ) -> Sequence[str]

def tuple_chr_s( t: MaybeSequence[int] ) -> strHerror tuple_chr( const Hlong T, char* Chr )

Herror T_tuple_chr( const Htuple T, Htuple* Chr )

HTuple HTuple::TupleChr( ) const

HTuple HTuple.TupleChr( )

Description🔗

tuple_chrTupleChr converts the input tuple Ttt, consisting of integer numbers, into a tuple of strings, each of length 1. When the encoding used in the HALCON library is UTF-8 (see set_system('filename_encoding', 'utf8')) and the string operators are set to work by code points (see set_system('tuple_string_operator_mode', 'codepoint')), which is the default for both, the operator accepts Unicode character codes and returns strings with the appropriate UTF-8 representations of the characters. When the HALCON library encoding is set to 'locale'"locale" or the string operator mode is 'byte'"byte", the operator accepts only numbers between 0 and 256. In that case the operator tuple_chrTupleChr returns strings with one byte length each, where the input number is set as ANSI code. See also Tuple / String Operations for a more detailed description of the different modes and further encoding issues.

If the input tuple is empty, the operator returns an empty tuple.

HDevelop In-line Operation🔗

HDevelop provides an in-line operation for tuple_chrTupleChr, which can be used in an expression in the following syntax:

Chr := chr(T)

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Ttt (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Input tuple with Unicode character codes or ANSI codes.

Restriction: 0 <= T

Chrchrchr (output_control) string(-array) → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Output tuple with strings built from the character codes in the input tuple.

Combinations with other operators🔗

Combinations

Alternatives

tuple_chrtTupleChrt

See also

tuple_ordTupleOrd, tuple_ordsTupleOrds

Module🔗

Foundation