### 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
String s = *this;
	if (s.begins_with(p_prefix)) {
		return s.substr(p_prefix.length(), s.length() - p_prefix.length());
	}
	return s;
}
String String::trim_suffix(const String &p_suffix) const {
	String s = *this;
	if (s.ends_with(p_suffix)) {
		return s.substr(0, s.length() - p_suffix.length());
	}
	return s;
}
bool String::is_valid_int() const {
	int len = length();
	if (len == 0) {
		return false;
	}
	int from = 0;
	if (len != 1 && (operator[](0) == '+' || operator[](0) == '-')) {
		from++;
	}
	for (int i = from; i < len; i++) {
		if (!is_digit(operator[](i))) {
			return false; 
		}
	}
	return true;
}
bool String::is_valid_hex_number(bool p_with_prefix) const {