public void Calculate(string langString) { if (What.Equals(langString, StringComparison.CurrentCultureIgnoreCase)) { IsOnlyImage = true; Lenght = 0; WordsCount = 0; return; } var clean = CleanEmoji.Replace(What, string.Empty); EmojiCount += (What.Length - clean.Length) / 2; Lenght = clean.Length; var resultsFirst = clean.ToLowerInvariant().Split(DelimitersOne, StringSplitOptions.RemoveEmptyEntries); var l = new List <string>(); foreach (var item in resultsFirst) { if (item.StartsWith("http://")) { continue; } if (item.StartsWith("https://")) { continue; } foreach (var w in item.Split(DelimitersTwo, StringSplitOptions.RemoveEmptyEntries)) { l.Add(w); } } Words = l.ToArray(); WordsCount = Words.Length; MomentCategory = Moment.GetCategory(); }