mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[code-watcher] init module.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace West.TelegramBot.CodeWatcher;
|
||||
|
||||
public static class StringExtension
|
||||
{
|
||||
// https://stackoverflow.com/a/23408020
|
||||
public static IEnumerable<string> SplitToLines(this string input)
|
||||
{
|
||||
using (var reader = new StringReader(input))
|
||||
{
|
||||
string line;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
yield return line;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user