From 83902b61b66e264e810c7a45b12054726d8477d2 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 25 Jul 2017 16:17:56 -0400 Subject: [PATCH] Shim for trimming a potentially null string --- ICD.Common.Utils/StringUtils.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ICD.Common.Utils/StringUtils.cs b/ICD.Common.Utils/StringUtils.cs index 8a27161..325a55e 100644 --- a/ICD.Common.Utils/StringUtils.cs +++ b/ICD.Common.Utils/StringUtils.cs @@ -516,5 +516,17 @@ namespace ICD.Common.Utils return builder.ToString(); } + + /// + /// Shim of value.ToString() + /// Returns null if input value is null. + /// + /// + /// + [PublicAPI, CanBeNull] + public static string Trim(string value) + { + return value == null ? null : value.ToUpper(); + } } }