### 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
const char32_t *cstr = get_data();
	String new_string;
	int start_index = 0;
	for (int i = 1; i < this->size(); i++) {
		bool is_prev_upper = is_ascii_upper_case(cstr[i - 1]);
		bool is_prev_lower = is_ascii_lower_case(cstr[i - 1]);
		bool is_prev_digit = is_digit(cstr[i - 1]);
		bool is_curr_upper = is_ascii_upper_case(cstr[i]);
		bool is_curr_lower = is_ascii_lower_case(cstr[i]);
		bool is_curr_digit = is_digit(cstr[i]);
		bool is_next_lower = false;
		if (i + 1 < this->size()) {
			is_next_lower = is_ascii_lower_case(cstr[i + 1]);
		}
		const bool cond_a = is_prev_lower && is_curr_upper; 
		const bool cond_b = (is_prev_upper || is_prev_digit) && is_curr_upper && is_next_lower; 
		const bool cond_c = is_prev_digit && is_curr_lower && is_next_lower; 
		const bool cond_d = (is_prev_upper || is_prev_lower) && is_curr_digit; 
		if (cond_a || cond_b || cond_c || cond_d) {
			new_string += this->substr(start_index, i - start_index) + "_";
			start_index = i;
		}
	}
	new_string += this->substr(start_index, this->size() - start_index);
	return new_string.to_lower();
}
String String::capitalize() const {