mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Update fastReplace (return null if source string is null)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user