diff --git a/src/Liquid.Core/Extensions/StringExtension.cs b/src/Liquid.Core/Extensions/StringExtension.cs index 4c0c4f1..793fe35 100644 --- a/src/Liquid.Core/Extensions/StringExtension.cs +++ b/src/Liquid.Core/Extensions/StringExtension.cs @@ -16,8 +16,7 @@ namespace Liquid.Core.Extensions /// [ExcludeFromCodeCoverage] public static class StringExtension - { - private static readonly Regex WordCountRegex = new Regex(@"[^\s]+", RegexOptions.Compiled); + { /// /// Determines whether a string contains a specified value. @@ -100,26 +99,6 @@ public static StringBuilder AppendIf(this StringBuilder builder, string value, b return builder; } - /// - /// Count all words in a given string, it excludes whitespaces, tabs and line breaks - /// - /// The string to count words - /// int - public static int CountWords(this string str) - { - var count = 0; - try - { - var matches = WordCountRegex.Matches(str); - count = matches.Count; - } - catch - { - //left intentionally blank. - } - return count; - } - /// /// Converts a string to guid. /// diff --git a/src/Liquid.Core/Liquid.Core.csproj b/src/Liquid.Core/Liquid.Core.csproj index f6a4353..7f3f251 100644 --- a/src/Liquid.Core/Liquid.Core.csproj +++ b/src/Liquid.Core/Liquid.Core.csproj @@ -10,7 +10,7 @@ Avanade 2019 https://github.com/Avanade/Liquid-Application-Framework logo.png - 8.0.0-alpha-02 + 8.0.0-alpha-03 true {C33A89FC-4F4D-4274-8D0F-29456BA8F76B} true