Skip to content

Commit

Permalink
# fix bug SUBSTRING plugin param end index
Browse files Browse the repository at this point in the history
# 插件-字符串截短, 支持尾字符. eg:12345678910 -> 7,11 -> 8910
  • Loading branch information
luomin0601 committed Jul 13, 2022
1 parent ed4974f commit a8e2fb3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public Object handle(PreItemVO item, Map<String, Object> jsonInfo, String[] sour
String field = jsonInfo.get(sourceField[0]).toString();
int start =Integer.parseInt(args[0]);
int end = Integer.parseInt(args[1]);
if (field != null && field.length() > end) {
if (field != null && (field.length() > end || field.length() == end)) {
return field.substring(start, end);
} else {
return field;
Expand Down

0 comments on commit a8e2fb3

Please sign in to comment.