Last active
September 19, 2019 10:36
-
-
Save grandsilence/5e3ce455359e07265f6d5963d4b08f8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Methods: After, Before | |
string response = @"hello_world"; | |
string after = response.After("hello"); | |
// after = "_world" | |
string before = response.Before("world"); | |
// before = "hello_" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Methods: Substrings (recursive substring) | |
string response = @" | |
<html> | |
<body> | |
<h1>Title 1</h1> | |
<h1>Title 2</h1> | |
... | |
</body> | |
</html> | |
"; | |
string[] allHeadersText = response.Substrings("<h1>", "</h1>"); | |
// allHeadersText will be an array with: Title 1, Title 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment