aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yaml/fyamlcpp/fyamlcpp.cpp
diff options
context:
space:
mode:
authorjansenin <jansenin@yandex-team.com>2023-08-14 13:14:44 +0300
committerjansenin <jansenin@yandex-team.com>2023-08-14 14:28:19 +0300
commitfebf300349ed585aa250bef06bfbdb91597a08bd (patch)
tree5fe536e237be44ffd8af8808d3afbd0f24a7e23a /library/cpp/yaml/fyamlcpp/fyamlcpp.cpp
parent400f29bde4ceb79c8120bbc57dff1725c5fa7c80 (diff)
downloadydb-febf300349ed585aa250bef06bfbdb91597a08bd.tar.gz
add Map.Has(TString)
Diffstat (limited to 'library/cpp/yaml/fyamlcpp/fyamlcpp.cpp')
-rw-r--r--library/cpp/yaml/fyamlcpp/fyamlcpp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/cpp/yaml/fyamlcpp/fyamlcpp.cpp b/library/cpp/yaml/fyamlcpp/fyamlcpp.cpp
index 37ead18350..d990d056e3 100644
--- a/library/cpp/yaml/fyamlcpp/fyamlcpp.cpp
+++ b/library/cpp/yaml/fyamlcpp/fyamlcpp.cpp
@@ -417,6 +417,10 @@ void TMapping::Remove(const TNodePairRef& toRemove) {
free(toRemove.Pair_);
}
+bool TMapping::Has(TString key) {
+ return fy_node_mapping_lookup_by_string(Node_, key.data(), key.size()) != nullptr;
+}
+
TMappingIterator TMapping::Remove(const TMappingIterator& toRemove) {
ENSURE_NODE_NOT_EMPTY(Node_);
Y_VERIFY_DEBUG(Node_ == toRemove.Node_);