NuSelfUpdate.Tests.Helpers.MockFileSystem.IndexOfAll C# (CSharp) Method

IndexOfAll() private method

private IndexOfAll ( string value, char ch ) : IEnumerable
value string
ch char
return IEnumerable
        IEnumerable<int> IndexOfAll(string value, char ch)
        {
            int index = -1;
            do
            {
                index = value.IndexOf(ch, index + 1);
                if (index >= 0)
                {
                    yield return index;
                }
            }
            while (index >= 0);
        }