Google Sheets extract substring

To understand these examples easily, think of the output values as a segment cut out from an input string. In the first example, the formula picked the result dom from Random text by going to the 4th character and extracting the text for a length of 3 characters. A similar process was repeated in the next two examples.

What if the formula reaches the end of the string before it extracts the extract_length completely? The formula simply returns characters from starting_at to the end of the string. So instead of generating an error, it just stops at the end of the string. I demonstrated this in the final example. The total length of the string Consistent is 10. I wanted the formula to start at the 7th position, and extract 6 characters after that. That implies that the formula should go until 12th character, which doesnt exist. So the formula just returned tent, because that is what is available until the end of the input string.