ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Add helper functions to convert ASCII bytes to EBCDIC and vice versa #6892

Closed MohamedSabthar closed 2 months ago

MohamedSabthar commented 2 months ago

Description: Add following helper methods to convert ASCII bytes to EBCDIC bytes and vice versa in copybook module

# Converts a byte array encoded in EBCDIC to a byte array encoded in ASCII.
#
# + ebcdic - The input byte array encoded in EBCDIC
# + return - The output byte array encoded in ASCII
public function toAsciiBytes(byte[] ebcdic) returns byte[] {
    // ...
}
# Converts a byte array encoded in ASCII to a byte array encoded in EBCDIC.
#
# + ascii - The input byte array encoded in ASCII
# + return - The output byte array encoded in EBCDIC
public function toEbcdicBytes(byte[] ascii) returns byte[] {
    // ...
}

Describe your problem(s)

Describe your solution(s)

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):