using System.Collections.Generic; namespace EasyTalk.Editor.Extensions { public static class Extensions { public static List AllIndexesOf(this string text, string value) { List indexes = new List(); int index = 0; while (index < text.Length && (index = text.IndexOf(value, index)) >= 0) { indexes.Add(index); index += value.Length; } return indexes; } } }