Update fastReplace (return null if source string is null)

This commit is contained in:
kevlahnota
2017-09-15 14:46:29 +00:00
parent b332038722
commit 3723a4e656

View File

@@ -269,6 +269,9 @@ public class TextUtil {
//fast Replace
public static String fastReplace( String str, String target, String replacement ) {
if (str == null) {
return null;
}
int targetLength = target.length();
if( targetLength == 0 ) {
return str;