BAEL-838 Corrected Helper class and associated empty string test case. Added StringUtils.substing tests.
(cherry picked from commit 124966a)
This commit is contained in:
@@ -10,7 +10,7 @@ package com.baeldung.string;
|
||||
public class RemoveLastChar {
|
||||
public static String substring (String s) {
|
||||
if (s == null || s.length() == 0) {
|
||||
return null;
|
||||
return s;
|
||||
} else {
|
||||
return (s.substring(0, s.length() - 1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user