Skip to content

Commit

Permalink
Merge pull request #233 from Avanade/feature/structV8
Browse files Browse the repository at this point in the history
fix: removes deprecated extensions.
  • Loading branch information
lucianareginalino authored Jun 17, 2024
2 parents b365cf4 + 64c8298 commit 14df2be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
23 changes: 1 addition & 22 deletions src/Liquid.Core/Extensions/StringExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ namespace Liquid.Core.Extensions
///
[ExcludeFromCodeCoverage]
public static class StringExtension
{
private static readonly Regex WordCountRegex = new Regex(@"[^\s]+", RegexOptions.Compiled);
{

/// <summary>
/// Determines whether a string contains a specified value.
Expand Down Expand Up @@ -100,26 +99,6 @@ public static StringBuilder AppendIf(this StringBuilder builder, string value, b
return builder;
}

/// <summary>
/// Count all words in a given string, it excludes whitespaces, tabs and line breaks
/// </summary>
/// <param name="str">The string to count words</param>
/// <returns>int</returns>
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;
}

/// <summary>
/// Converts a string to guid.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Liquid.Core/Liquid.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Copyright>Avanade 2019</Copyright>
<PackageProjectUrl>https://github.com/Avanade/Liquid-Application-Framework</PackageProjectUrl>
<PackageIcon>logo.png</PackageIcon>
<Version>8.0.0-alpha-02</Version>
<Version>8.0.0-alpha-03</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProjectGuid>{C33A89FC-4F4D-4274-8D0F-29456BA8F76B}</ProjectGuid>
<IsPackable>true</IsPackable>
Expand Down

0 comments on commit 14df2be

Please sign in to comment.