diff options
author | Neil <nyamatongwe@gmail.com> | 2019-04-05 08:32:58 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-04-05 08:32:58 +1100 |
commit | cb81cd27cd1b162c381db4106cb29c4c397146a8 (patch) | |
tree | ac40f63a508d517d630cb266124b9bcebf914495 /src/UniqueString.h | |
parent | 966c872120ea94941f2672f15cdcc9018a5a5dd0 (diff) | |
download | scintilla-mirror-cb81cd27cd1b162c381db4106cb29c4c397146a8.tar.gz |
Backport: Feature [feature-requests:#1272]. Add API to set default fold display text.
Backport of changeset 7400:9fcb52fdb307.
Diffstat (limited to 'src/UniqueString.h')
-rw-r--r-- | src/UniqueString.h | 4 |
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 |