We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34c4c25 commit fa0da58Copy full SHA for fa0da58
codec2talkie/src/main/java/com/radio/codec2talkie/tools/TextTools.java
@@ -45,15 +45,14 @@ public static String getString(ByteBuffer byteBuffer) {
45
while (byteBuffer.hasRemaining()) {
46
byte b = byteBuffer.get();
47
char c = charset.decode(ByteBuffer.wrap(new byte[]{b})).toString().charAt(0);
48
- if (c == '\r') continue;
49
if (c == '\n') {
50
break;
51
}
52
result.append(c);
53
54
byteBuffer.compact();
55
56
- return result.toString();
+ return result.toString().replaceAll("[\\r\\n]+$", "");
57
58
59
public static byte[] hexStringToByteArray(String s) {
0 commit comments