aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/utils/line_split.h
diff options
context:
space:
mode:
authoraneporada <aneporada@yandex-team.com>2024-11-12 07:55:22 +0300
committeraneporada <aneporada@yandex-team.com>2024-11-12 08:10:50 +0300
commit621c8c7dade57165d6d431295f7a9a9143a062fa (patch)
treecc5dee0e889655fded4d4878071a0a6a76d2e17d /yql/essentials/utils/line_split.h
parent55cec9f6b0618fb3570fc8ef66aad151f4932591 (diff)
downloadydb-621c8c7dade57165d6d431295f7a9a9143a062fa.tar.gz
Merge GH PR #9404
commit_hash:d780798556aedbe2be898d69185380f2ecb95f9c
Diffstat (limited to 'yql/essentials/utils/line_split.h')
-rw-r--r--yql/essentials/utils/line_split.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/yql/essentials/utils/line_split.h b/yql/essentials/utils/line_split.h
new file mode 100644
index 0000000000..65e940990c
--- /dev/null
+++ b/yql/essentials/utils/line_split.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include <util/stream/input.h>
+#include <util/generic/string.h>
+
+class TLineSplitter final {
+public:
+ explicit TLineSplitter(IInputStream& stream);
+
+ size_t Next(TString& st);
+
+private:
+ IInputStream& Stream_;
+ bool HasPendingLineChar_ = false;
+ char PendingLineChar_ = 0;
+};