git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137702 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2003-11-03 03:48:59 +00:00
parent 7f13c39483
commit 41ff6f096e
1 changed files with 13 additions and 13 deletions

View File

@ -147,7 +147,7 @@ import java.util.List;
* @author Gary Gregory
* @author Phil Steitz
* @since 1.0
* @version $Id: StringUtils.java,v 1.115 2003/11/01 19:20:35 scolebourne Exp $
* @version $Id: StringUtils.java,v 1.116 2003/11/03 03:48:59 ggregory Exp $
*/
public class StringUtils {
// Performance testing notes (JDK 1.4, Jul03, scolebourne)
@ -2485,14 +2485,14 @@ public class StringUtils {
* <code>null</code> if null String input
* @since 2.1
*/
public static String removeStart(String str, String remove) {
if (str == null || str.length() == 0 || remove == null || remove.length() == 0) {
return str;
public static String removeStart(String string, String remove) {
if (string == null || string.length() == 0 || remove == null || remove.length() == 0) {
return string;
}
if (str.startsWith(remove)){
return str.substring(remove.length());
if (string.startsWith(remove)){
return string.substring(remove.length());
}
return str;
return string;
}
/**
@ -2519,14 +2519,14 @@ public class StringUtils {
* <code>null</code> if null String input
* @since 2.1
*/
public static String removeEnd(String str, String remove) {
if (str == null || str.length() == 0 || remove == null || remove.length() == 0) {
return str;
public static String removeEnd(String string, String remove) {
if (string == null || string.length() == 0 || remove == null || remove.length() == 0) {
return string;
}
if (str.endsWith(remove)) {
return str.substring(0, str.length() - remove.length());
if (string.endsWith(remove)) {
return string.substring(0, string.length() - remove.length());
}
return str;
return string;
}
// Replacing