Skip to content

Commit

Permalink
!13 插件-字符串截短, 支持尾字符. eg:12345678910 -> 7,11 -> 8910
Browse files Browse the repository at this point in the history
Merge pull request !13 from luomin_vegetable_chicken/master-lm-20220713
  • Loading branch information
wfh45678 authored and gitee-org committed Jul 14, 2022
2 parents ed4974f + a8e2fb3 commit 9cd3987
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 9cd3987

Please sign in to comment.