Package util
Class ASCIICoder
java.lang.Object
util.ASCIICoder
Class for encoding and decoding strings with ASCII escape sequences
- Since:
- 2006.10.05
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ASCIICoder
public ASCIICoder()Create an ASCII coder (dummy).- Since:
- 2023.07.26 (Christian Borgelt)
-
-
Method Details
-
encode
Encode a string using ASCII escape sequences.- Parameters:
s
- the string to encode- Returns:
- the string with all non-printable characters replaced by ASCII escape sequences
- Since:
- 2006.10.05 (Christian Borgelt)
-
decode
Decode ASCII escape sequences in a string.- Parameters:
s
- the string to decode- Returns:
- the string with all ASCII escape sequences replaced by their corresponding characters
- Since:
- 2006.10.05 (Christian Borgelt)
-
main
Main function for testing basic functionality.- Parameters:
args
- the command line arguments- Since:
- 2006.10.05 (Christian Borgelt)
-