aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/UniqueString.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/UniqueString.h')
-rw-r--r--src/UniqueString.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/UniqueString.h b/src/UniqueString.h
index 18c31283e..8d95cb1ab 100644
--- a/src/UniqueString.h
+++ b/src/UniqueString.h
@@ -11,6 +11,10 @@
namespace Scintilla {
+constexpr bool IsNullOrEmpty(const char *text) noexcept {
+ return text == nullptr || *text == '\0';
+}
+
using UniqueString = std::unique_ptr<const char[]>;
/// Equivalent to strdup but produces a std::unique_ptr<const char[]> allocation to go