### 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
int n_pairs = length() - 1;
	Vector<String> b;
	if (n_pairs <= 0) {
		return b;
	}
	b.resize(n_pairs);
	for (int i = 0; i < n_pairs; i++) {
		b.write[i] = substr(i, 2);
	}
	return b;
}
float String::similarity(const String &p_string) const {