### 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
success = d[d.size()] == 0;
	if (!success) {
		state = false;
	}
	CHECK(state);
}
TEST_CASE("[String] lstrip and rstrip") {
#define STRIP_TEST(x)             \
	{                             \
		bool success = x;         \
		state = state && success; \
	}
	bool state = true;
	
	).lstrip("") == "abc");
	).rstrip("") == "abc");
	
	).lstrip("a") == "bc");
	).rstrip("c") == "ab");
	
	STRIP_TESTbbababccc").lstrip("ab") == "ccc");
	STRIP_TEST(String("aaabcbcbcbbcbbc").rstrip("cb") == "aaa");
	
	STstrip("") == "");
	STRIP_TEST(String("").rstrip("") == "");
	
	bcabc").lstrip("bca") == "");
	bcabc").rstrip("bca") == "");
	
	).lstrip("c") == "abc");