Browse Source

Remove methods Data, Size, Empty from TString

If this pr has broken something, try using the methods named with a small letter

\[nodiff:caesar\]
commit_hash:c08a737938cff39577c6e47d4434531f6355e4c2
mikhnenko 4 months ago
parent
commit
6c3456e031

+ 4 - 0
util/generic/string.h

@@ -1197,6 +1197,10 @@ public:
     bool to_upper(size_t pos = 0, size_t n = TBase::npos);
     bool to_title(size_t pos = 0, size_t n = TBase::npos);
 
+    constexpr const TCharType* Data() const noexcept = delete;
+    constexpr size_t Size() noexcept = delete;
+    Y_PURE_FUNCTION constexpr bool Empty() const noexcept = delete;
+
 public:
     /**
      * Modifies the substring of length `n` starting from `pos`, applying `f` to each position and symbol.

+ 3 - 0
yql/essentials/public/udf/udf_string.h

@@ -138,6 +138,9 @@ public:
     inline ui32 Size() const { return Data_->Size(); }
     inline char* Data() const { return Data_->Data(); }
 
+    inline ui32 size() const { return Data_->Size(); }
+    inline char* data() const { return Data_->Data(); }
+
     inline void Ref() {
         if (Data_ != nullptr) {
             Data_->Ref();

+ 2 - 2
yql/essentials/public/udf/udf_string_ref.h

@@ -148,14 +148,14 @@ private:
     template<typename TStringType>
     struct TByData {
         static constexpr auto Get(const TStringType& buf) noexcept {
-            return buf.Data();
+            return buf.data();
         }
     };
 
     template<typename TStringType>
     struct TBySize {
         static constexpr auto Get(const TStringType& buf) noexcept {
-            return buf.Size();
+            return buf.size();
         }
     };