Splitting a path string
I took the liberty to make the exercise as well to see how our approaches differ. I don't think there are many remarks in terms of performance although StringBuilder.Remove() is a red flag in that area.

All together I think my code provides a more easily readable solution which should help in terms of human-reading efficiency. In the end I pretty much abstracted the things you do under library features.

public void SplitPath(string mainText, out string firstPart, out string secondPart)
{
  const string pivot = "Fixed";
  const char delimiter = '\\';

  var entries = mainText.Split(delimiter);
  int pivotIndex = entries.Length;
  for (var i = 0; i &lt; entries.Length; i++)
  {
      if (entries[i] == pivot)
      {
          // Take index + 2 because linq.Take/Skip is 1-based
          // Optionally take index + 1 to avoid out-of-bounds when the pivot is the last element
          pivotIndex = (i == entries.Length) ? i + 1 : i + 2;
          break;
      }
  }

  firstPart = string.Join(delimiter.ToString(), entries.Take(pivotIndex));
  secondPart = string.Join(delimiter.ToString(), entries.Skip(pivotIndex));
}


I have tested this code with inputs C:\Abc\Fixed\MyTemp\Japan\Tokyo, C:\Abc\Fixed and C:\Abc.

If you'd want to take your approach after all, a few remarks:


Try to early return by using a negated if-statement condition.
Put your delimiter in a variable
Avoid magic values
Avoid removing data from the StringBuilder