### 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
i++;
	}
	return ""; 
}
String String::get_slicec(char32_t p_splitter, int p_slice) const {
	if (is_empty()) {
		return String();
	}
	if (p_slice < 0) {
		return String();
	}
	const char32_t *c = this->ptr();
	int i = 0;
	int prev = 0;
	int count = 0;
	while (true) {
		if (c[i] == 0 || c[i] == p_splitter) {
			if (p_slice == count) {
				return substr(prev, i - prev);
			} else if (c[i] == 0) {
				return String();
			} else {
				count++;
				prev = i + 1;
			}
		}
		i++;
	}
}
Vector<String> String::split_spaces() const {