Fix bug in grep method
This commit is contained in:
parent
62cafd7b40
commit
e9a71bd6f1
|
@ -83,6 +83,9 @@ public class StringUtil {
|
|||
result.append(line).append('\n');
|
||||
}
|
||||
}
|
||||
return result.deleteCharAt(result.length() - 1).toString();
|
||||
if (result.length() >= 2) {
|
||||
result = result.deleteCharAt(result.length() - 1);
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue