From 2e5570e609934d7c575f8e5d1927380429d3362b Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 31 Oct 2023 12:13:48 +0100 Subject: [PATCH] Add String::isEmpty() --- api/String.h | 1 + 1 file changed, 1 insertion(+) diff --git a/api/String.h b/api/String.h index 73a872de..3ef388a1 100644 --- a/api/String.h +++ b/api/String.h @@ -89,6 +89,7 @@ class String // invalid string (i.e., "if (s)" will be true afterwards) bool reserve(unsigned int size); inline unsigned int length(void) const {return len;} + inline bool isEmpty(void) const { return length() == 0; } // creates a copy of the assigned value. if the value is null or // invalid, or if the memory allocation fails, the string will be