### 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 new_string;
	int search_from = 0;
	int result = 0;
	while ((result = find(p_key, search_from)) >= 0) {
		new_string += substr(search_from, result - search_from);
		new_string += p_with;
		int k = 0;
		while (p_key[k] != '\0') {
			k++;
		}
		search_from = result + k;
	}
	if (search_from == 0) {
		return *this;
	}
	new_string += substr(search_from, length() - search_from);
	return new_string;
}
String String::replace_first(const String &p_key, const String &p_with) const {