diff --git a/ICD.Common.Utils/StringUtils.cs b/ICD.Common.Utils/StringUtils.cs index 8d8c0c8..df05254 100644 --- a/ICD.Common.Utils/StringUtils.cs +++ b/ICD.Common.Utils/StringUtils.cs @@ -191,6 +191,54 @@ namespace ICD.Common.Utils return TryConvert(Convert.ToUInt32, value, out result); } + /// + /// Attempts to parse the string as a short integer. + /// + /// + /// + /// + [PublicAPI] + public static bool TryParse(string value, out short result) + { + return TryConvert(Convert.ToInt16, value, out result); + } + + /// + /// Attempts to parse the string as an unsigned short integer. + /// + /// + /// + /// + [PublicAPI] + public static bool TryParse(string value, out ushort result) + { + return TryConvert(Convert.ToUInt16, value, out result); + } + + /// + /// Attempts to parse the string as a long integer. + /// + /// + /// + /// + [PublicAPI] + public static bool TryParse(string value, out long result) + { + return TryConvert(Convert.ToInt64, value, out result); + } + + /// + /// Attempts to parse the string as an unsigned long integer. + /// + /// + /// + /// + [PublicAPI] + public static bool TryParse(string value, out ulong result) + { + return TryConvert(Convert.ToUInt64, value, out result); + } + /// /// Attempts to parse the string as a float. ///