javadoc.
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:
parent
7f13c39483
commit
41ff6f096e
|
@ -147,7 +147,7 @@ import java.util.List;
|
||||||
* @author Gary Gregory
|
* @author Gary Gregory
|
||||||
* @author Phil Steitz
|
* @author Phil Steitz
|
||||||
* @since 1.0
|
* @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 {
|
public class StringUtils {
|
||||||
// Performance testing notes (JDK 1.4, Jul03, scolebourne)
|
// Performance testing notes (JDK 1.4, Jul03, scolebourne)
|
||||||
|
@ -2485,14 +2485,14 @@ public class StringUtils {
|
||||||
* <code>null</code> if null String input
|
* <code>null</code> if null String input
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
*/
|
*/
|
||||||
public static String removeStart(String str, String remove) {
|
public static String removeStart(String string, String remove) {
|
||||||
if (str == null || str.length() == 0 || remove == null || remove.length() == 0) {
|
if (string == null || string.length() == 0 || remove == null || remove.length() == 0) {
|
||||||
return str;
|
return string;
|
||||||
}
|
}
|
||||||
if (str.startsWith(remove)){
|
if (string.startsWith(remove)){
|
||||||
return str.substring(remove.length());
|
return string.substring(remove.length());
|
||||||
}
|
}
|
||||||
return str;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2519,14 +2519,14 @@ public class StringUtils {
|
||||||
* <code>null</code> if null String input
|
* <code>null</code> if null String input
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
*/
|
*/
|
||||||
public static String removeEnd(String str, String remove) {
|
public static String removeEnd(String string, String remove) {
|
||||||
if (str == null || str.length() == 0 || remove == null || remove.length() == 0) {
|
if (string == null || string.length() == 0 || remove == null || remove.length() == 0) {
|
||||||
return str;
|
return string;
|
||||||
}
|
}
|
||||||
if (str.endsWith(remove)) {
|
if (string.endsWith(remove)) {
|
||||||
return str.substring(0, str.length() - remove.length());
|
return string.substring(0, string.length() - remove.length());
|
||||||
}
|
}
|
||||||
return str;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replacing
|
// Replacing
|
||||||
|
|
Loading…
Reference in New Issue