### Godot version

4.0 beta17

### System information

Windows10

### Issue description

call `"".split()`
Is there an infinite loop inside? Function does not return.

### Steps to reproduce

"".split()

### Minimal reproduction project

N/A
String src = this->replace("\\", "/");
	String dst = p_path.replace("\\", "/");
	if (!src.ends_with("/")) {
		src += "/";
	}
	if (!dst.ends_with("/")) {
		dst += "/";
	}
	if (src.begins_with("res://") && dst.begins_with("res://")) {
		src = src.replace("res://", "/");
		dst = dst.replace("res://", "/");
	} else if (src.begins_with("user://") && dst.begins_with("user://")) {
		src = src.replace("user://", "/");
		dst = dst.replace("user://", "/");
	} else if (src.begins_with("/") && dst.begins_with("/")) {
		
	} else {
		
		String src_begin = src.get_slicec('/', 0);
		String dst_begin = dst.get_slicec('/', 0);
		if (src_begin != dst_begin) {
			return p_path; 
		}
		src = src.substr(src_begin.length(), src.length());
		dst = dst.substr(dst_begin.length(), dst.length());
	}