Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 6 Current »

Content Freeze

As of July 25th, 2023, there is a content freeze on this page.

Converts a string to EDCDIC hex.

Parameters
  1. String
  2. Length to pad to (optional)
Return Value

This API returns a JavaScript Buffer object. The length of the buffer is determined by the parameters. If the String value length is less than the length provided, the buffer is padded with blanks. If the String value length is longer than the length provided, only the characters up to the specified length are converted.

Exception Handling

If you pass in an incorrect hex value, the Buffer module can throw an error.

Example
var myBuff = String.toEbcdicHex('Hello world');
var myString = String.fromEbcdicHex(myBuff.toString('hex'));



  • No labels