chr

Prev Next

Function Names

chr

Description

This function returns the UNICODE character code of the character supplied.

Call as: function

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

No.TypeDescription
1
input
string character code

Character code: 0 ... 1114111 (full UNICODE range). 0 returns an empty string.

Return value

TypeDescription
numeral Decoded character

The string contains 1 character if a valid non-zero code is provided. For code 0, an empty string is returned.

Exceptions

Invalid character code (outside 0 - 1114111 range)

Examples

      echo( "'", chr( 0 ), "'" );      // Empty string
      echo( "'", chr( 65 ), "'" );     // A
      echo( "'", chr( 223 ), "'" );    // Sharp S
      echo( "'", chr( 8364 ), "'" );   // EURO sign
      echo( "'", chr( 119070 ), "'" ); // Violin clef

Output

''
'A'
'ß'
'€'
'𝄞'
Try it yourself: Open LIB_Function_chr.b4p in B4P_Examples.zip. Decompress before use.

See also

code