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:
iaforek
2017-05-08 00:11:03 +02:00
committed by Predrag Maric
parent 6e589636ed
commit b29cb580a6
2 changed files with 9 additions and 3 deletions
@@ -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));
}