Looking for a given substring starting from a specified offset can be achieved by such code: ``str.Substring(startIndex).IndexOf(char1)``. This works well, but it creates a new ``string`` for each call to the ``Substring`` method. When this is done in a loop, a lot of ``strings`` are created for nothing, which can lead to performance problems if ``str`` is large.