summaryrefslogtreecommitdiff
path: root/src/inc/clr/str.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc/clr/str.h')
-rw-r--r--src/inc/clr/str.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/inc/clr/str.h b/src/inc/clr/str.h
new file mode 100644
index 0000000000..94c8ed46b5
--- /dev/null
+++ b/src/inc/clr/str.h
@@ -0,0 +1,28 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//
+
+//
+// This header provides general standard string services.
+//
+
+#ifndef _clr_str_h_
+#define _clr_str_h_
+
+namespace clr
+{
+ namespace str
+ {
+ //-----------------------------------------------------------------------------------------
+ // Returns true if the provided string is a null pointer or the empty string.
+ static inline bool
+ IsNullOrEmpty(LPCWSTR wzStr)
+ {
+ return wzStr == nullptr || *wzStr == W('\0');
+ }
+ }
+}
+
+#endif // _clr_str_h_
+