Skip to content

Commit ce969ed

Browse files
committed
feat(tests): add helper extension to normalize strings
1 parent 69afe90 commit ce969ed

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System.Text.RegularExpressions;
2+
3+
namespace JsonApiDotNetCoreExampleTests.Helpers.Extensions
4+
{
5+
6+
public static class StringExtensions
7+
{
8+
public static string Normalize(this string input)
9+
{
10+
return Regex.Replace(input, @"\s+", string.Empty)
11+
.ToUpper()
12+
.Replace('"', '\'');
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)