sunpengfei
7 天以前 d317a290c03d4c40687fcd01efc6c22304874e87
FlexJobApi.Core/Utils/StringUtils/StringUtils.cs
@@ -49,6 +49,12 @@
            return null;
        }
        public static decimal? ToDecimal(this string str)
        {
            if (str.IsNotNull() && decimal.TryParse(str, out var @int)) return @int;
            return null;
        }
        public static T? ToEnum<T>(this string str, string requiredMessage = null)
             where T : struct
        {
@@ -81,7 +87,7 @@
        public static bool CheckIsIdentityNumber18(this string identity)
        {
            return identity.IsNotNull() && identity.TryValidate(EnumValidationTypes.Identity).IsValid && identity.Length == 18;
            return identity.IsNotNull() && identity.TryValidate(EnumValidationTypes.ValiIdentity).IsValid && identity.Length == 18;
        }
        /// <summary>