-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from xxxxue/fix_bug
fix: 修复编译 java 代码字符串报错的bug
- Loading branch information
Showing
5 changed files
with
54 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package defpackage; | ||
|
||
public class StrUtils { | ||
public static String d(String data) { | ||
int l = data.length() / 2; | ||
byte[] b = new byte[l]; | ||
for (int i = 0; i < l; i++) { | ||
b[i] = Integer.valueOf(data.substring(i * 2, (i * 2) + 2), 16).byteValue(); | ||
} | ||
for (int i2 = 0; i2 < b.length; i2++) { | ||
b[i2] = (byte) (b[i2] - 1); | ||
} | ||
return new String(b); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters