From cf2e2161cf9907dadbd9117d2c7d411e633b95bc Mon Sep 17 00:00:00 2001 From: pitzm Date: Fri, 2 Feb 2024 10:08:00 +0100 Subject: [PATCH] =?UTF-8?q?Base=20Module:=20Extension=20Methods=20erg?= =?UTF-8?q?=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base/ModuleExtensions.vb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Base/ModuleExtensions.vb b/Base/ModuleExtensions.vb index 2c0a78aa..28dba280 100644 --- a/Base/ModuleExtensions.vb +++ b/Base/ModuleExtensions.vb @@ -65,6 +65,30 @@ Public Module ModuleExtensions Return (pString.Trim().ToLower() = "true") OrElse (pString.Trim() = "1") End Function + ''' + ''' Checks if a string is null or empty + ''' + ''' The input string + ''' True string is null or empty, otherwise false. + + Public Function IsNullOrEmpty(pString As String) As Boolean + Return String.IsNullOrEmpty(pString) + End Function + + ''' + ''' Checks if a string is NOT null or empty + ''' + ''' The input string + ''' True string is null or empty, otherwise false. + + Public Function IsNotNullOrEmpty(pString As String) As Boolean + If String.IsNullOrEmpty(pString) Then + Return False + Else + Return True + End If + End Function + ' ====================================================== ' === DICTIONARY ' ======================================================