diff --git a/README.md b/README.md index cfcd98f..b7d3d89 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# ReadOnlySpanExtensions -Available via Nuget: https://www.nuget.org/packages/ReadOnlySpanExtensions - +# ReadOnlySpanExtensions (C#) +Available via Nuget: https://www.nuget.org/packages/ReadOnlySpanExtensions \ +\ Little convenience helper extension methods for slicing `ReadOnlySpan` (C#) via texts.\ All available extension methods start with `Span` in their name. @@ -8,146 +8,130 @@ All available extension methods start with `Span` in their name. ## SpanBefore Returns all characters before the given text. -Example: - - - -
spantextReturn value
Test1/Test2/Test1
+### Example +span | text | Return value +-----|------|------------- +`Test1/Test2` | `/` | `Test1` ## SpanBeforeIncluding Returns all characters before and including the given text itself. -Example: - - - -
spantextReturn value
Test1/Test2/Test1/
+### Example +span | text | Return value +-----|------|------------- +`Test1/Test2` | `/` | `Test1/` ## SpanBeforeLast Returns all characters before the last occurence of the given text. -Example: - - - -
spantextReturn value
Test1/Test2TestTest1/
+### Example +span | text | Return value +-----|------|------------- +`Test1/Test2` | `Test` | `Test1/` ## SpanBeforeLastIncluding Returns all characters before the last occurence of and including the given text itself. -Example: - - - -
spantextReturn value
Test1/Test2TestTest1/Test
+### Example +span | text | Return value +-----|------|------------- +`Test1/Test2` | `Test` | `Test1/Test` ## SpanBeforeNth Returns all characters before the nth occurence of the given text. -Example: - - - -
spantextcountReturn value
Test1/Test2/Test3Test3Test1/Test2/
+### Example +span | text | count | Return value +-----|------|-------|------------- +`Test1/Test2/Test3` | `Test` | `3` | `Test1/Test2/` ## SpanBeforeNthIncluding Returns all characters before the nth occurence of and including the given text itself. -Example: - - - -
spantextcountReturn value
Test1/Test2/Test3Test3Test1/Test2/Test
+### Example +span | text | count | Return value +-----|------|-------|------------- +`Test1/Test2/Test3` | `Test` | `3` | `Test1/Test2/Test` ## SpanAfter Returns all characters after the given text. -Example: - - - -
spantextReturn value
Test1/Test2/Test2
+### Example +span | text | Return value +-----|------|------------- +`Test1/Test2` | `/` | `Test2` ## SpanAfterIncluding Returns all characters after and including the given text itself. -Example: - - - -
spantextReturn value
Test1/Test2//Test2
+### Example +span | text | Return value +-----|------|------------- +`Test1/Test2` | `/` | `/Test2` ## SpanAfterLast Returns all characters after the last occurence of the given text. -Example: - - - -
spantextReturn value
Test1/Test2Test2
+### Example +span | text | Return value +-----|------|------------- +`Test1/Test2` | `Test` | `2` ## SpanAfterLastIncluding Returns all characters after the last occurence of and including the given text itself. -Example: - - - -
spantextReturn value
Test1/Test2TestTest2
+### Example +span | text | Return value +-----|------|------------- +`Test1/Test2` | `Test` | `Test2` ## SpanAfterNth Returns all characters after the nth occurence of the given text. -Example: - - - -
spantextcountReturn value
Test1/Test2/Test3Test33
+### Example +span | text | count | Return value +-----|------|-------|------------- +`Test1/Test2/Test3` | `Test` | `3` | `3` ## SpanAfterNthIncluding Returns all characters after the nth occurence of and including the given text itself. -Example: - - - -
spantextcountReturn value
Test1/Test2/Test3Test3Test3
+### Example +span | text | count | Return value +-----|------|-------|------------- +`Test1/Test2/Test3` | `Test` | `3` | `Test3` ## SpanBetween Returns all characters between the given start and end text. -Example: - - - -
spanstartTextendTextReturn value
<td>Dummy1</td><td>Dummy2</td><td></td>Dummy1
+### Example +span | startText | endText | Return value +-----|-----------|---------|------------- +`Dummy1Dummy2` | `` | `` | `Dummy1` ## SpanBetweenIncluding Returns all characters between and including the given start and end text themselves. -Example: - - - -
spanstartTextendTextReturn value
<td>Dummy1</td><td>Dummy2</td><td></td><td>Dummy1</td>
+### Example +span | startText | endText | Return value +-----|-----------|---------|------------- +`Dummy1Dummy2` | `` | `` | `Dummy1` ## SpanBetweenOuter Returns all characters between the first occurrence of the given start and the last occurrence of the given end text. -Example: - - - -
spanstartTextendTextReturn value
<td>Dummy1</td><td>Dummy2</td><td></td>Dummy1</td><td>Dummy2
+### Example +span | startText | endText | Return value +-----|-----------|---------|------------- +`Dummy1Dummy2` | `` | `` | `Dummy1Dummy2` ## SpanBetweenOuterIncluding Returns all characters between the first occurrence of the given start and the last occurrence of the given end text and including the texts themselves. -Example: - - - -
spanstartTextendTextReturn value
<td>Dummy1</td><td>Dummy2</td><td></td><td>Dummy1</td><td>Dummy2</td>
+### Example +span | startText | endText | Return value +-----|-----------|---------|------------- +`Dummy1Dummy2` | `` | `` | `Dummy1Dummy2` # Further remarks See the tests for further examples.\ diff --git a/ReadOnlySpanExtensions/ReadOnlySpanExtensions.csproj b/ReadOnlySpanExtensions/ReadOnlySpanExtensions.csproj index 263293e..409ad4a 100644 --- a/ReadOnlySpanExtensions/ReadOnlySpanExtensions.csproj +++ b/ReadOnlySpanExtensions/ReadOnlySpanExtensions.csproj @@ -2,7 +2,7 @@ 1.0.1 - Fixed README + Modified & fixed README for NuGet. net7.0 enable enable