### 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
if (p_from < 0) {
		return -1;
	}
	const int len = length();
	if (len == 0) {
		return -1; 
	}
	const char32_t *src = get_data();
	int src_len = 0;
	while (p_str[src_len] != '\0') {
		src_len++;
	}
	if (src_len == 1) {
		const char32_t needle = p_str[0];
		for (int i = p_from; i < len; i++) {
			if (src[i] == needle) {
				return i;
			}
		}
	} else {
		for (int i = p_from; i <= (len - src_len); i++) {
			bool found = true;
			for (int j = 0; j < src_len; j++) {
				int read_pos = i + j;
				if (read_pos >= len) {
					ERR_PRINT("read_pos>=len");
					return -1;
				}
				if (src[read_pos] != (char32_t)p_str[j]) {