feat(*): Move readme to root

This commit is contained in:
Josh Creek
2021-08-25 23:49:20 +01:00
parent 431bc1feff
commit 06c6057876
2 changed files with 21 additions and 23 deletions
-22
View File
@@ -1,22 +0,0 @@
# Creek.HelpfulExtensions
A package containing helpful extensions to either save time or cognitive load.
## String Extensions
### SubstringBetween
This method allows you to return a substring from the first occurrence of the start string to the end string. Normally with `Substring` you have to put the start string and the length from there, but with this you can more naturally select between two strings, with the option to use either the first or last match for the end string.
For example, this code will result in the string `"fishman"`.
```csharp
string s = "bigfishmandogcatdoghat";
s = s.SubstringBetween("fish", "dog");
```
Whereas, this will result in the string `"fishmandogcat"` as the boolean passed in confirms you wish to use the last match of the end string.
```csharp
string s = "bigfishmandogcatdoghat";
s = s.SubstringBetween("fish", "dog", true);
```
+21 -1
View File
@@ -1,2 +1,22 @@
# Creek.HelpfulExtensions
A package containing helpful extensions to either save time or cognitive load.
A package containing helpful extensions to either save time or cognitive load.
## String Extensions
### SubstringBetween
This method allows you to return a substring from the first occurrence of the start string to the end string. Normally with `Substring` you have to put the start string and the length from there, but with this you can more naturally select between two strings, with the option to use either the first or last match for the end string.
For example, this code will result in the string `"fishman"`.
```csharp
string s = "bigfishmandogcatdoghat";
s = s.SubstringBetween("fish", "dog");
```
Whereas, this will result in the string `"fishmandogcat"` as the boolean passed in confirms you wish to use the last match of the end string.
```csharp
string s = "bigfishmandogcatdoghat";
s = s.SubstringBetween("fish", "dog", true);
```