We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbffb0a commit 2c6c552Copy full SHA for 2c6c552
BenchmarkDotNet8/Program.cs
@@ -1,4 +1,5 @@
1
using System.Reflection;
2
+using System.Text;
3
using BenchmarkDotNet.Attributes;
4
using BenchmarkDotNet.Columns;
5
using BenchmarkDotNet.Jobs;
@@ -15,6 +16,9 @@ public class Benchmarks
15
16
private readonly string _text1 = "Hello woRld! ThIs is a test.It CoUlD be a lot longer, but it'S not. Or is it?";
17
private readonly string _text2 = "Hello world! This is a test.it could be a lot longer, but it's not. Or is it?";
18
19
+ [Benchmark]
20
+ public string ReplaceStringBuilder() => new StringBuilder(_text1).Replace("Hello", "Goodbye").ToString();
21
+
22
[Benchmark]
23
public bool EqualsOrdinalIgnoreCase() => _text1.Equals(_text2, StringComparison.OrdinalIgnoreCase);
24
0 commit comments