# oct2char

This function converts an octetstring value to a charstring. The resulting charstring will have the same length as the incoming octetstring. The octets are interpreted as ASCII codes and the resulting characters are stored in the returned value. A dynamic test case error occurs if one or more octets of the input are greater than 7F.

Note: Some earlier versions of the TTCN-3 Core Language standard contained the description of function oct2char incorrectly under the name oct2str.

Related keyword:

- charstring
- octetstring
- oct2str

### oct2char(octetstring value) return charstring

Example 1:

var charstring myc := oct2char('4469707379'O);

Variable myc will contain the character string "Dipsy".