### 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
} else if (c <= 0x10ffff) { 
			fl += 2;
		} else {
			print_unicode_error(vformat("Invalid unicode codepoint (%x), cannot represent as UTF-16", c), true);
			fl += 1;
		}
	}
	Char16String utf16s;
	if (fl == 0) {
		return utf16s;
	}
	utf16s.resize(fl + 1);
	uint16_t *cdst = (uint16_t *)utf16s.get_data();
#define APPEND_CHAR(m_c) *(cdst++) = m_c
	for (int i = 0; i < l; i++) {
		uint32_t c = d[i];
		if (c <= 0xffff) { 
			APPEND_CHAR(c);
		} else if (c <= 0x10ffff) { 
			APPEND_CHAR(uint32_t((c >> 10) + 0xd7c0)); 
			APPEND_CHAR(uint32_t((c & 0x3ff) | 0xdc00)); 
		} else {
			APPEND_CHAR(0x20);
		}
	}
#undef APPEND_CHAR
	*cdst = 0; 
	return utf16s;
}
String::String(const char *p_str) {