AcManager.Tools.Helpers.AcStringValues.GetVersionFromName C# (CSharp) Method

GetVersionFromName() public static method

public static GetVersionFromName ( [ name, string &nameWithoutVersion ) : string
name [
nameWithoutVersion string
return string
        public static string GetVersionFromName([NotNull] string name, out string nameWithoutVersion) {
            if (name == null) throw new ArgumentNullException(nameof(name));

            var match = NameVersionRegex.Match(name);
            if (match.Success) {
                nameWithoutVersion = match.Groups[1].Value;
                return match.Groups[2].Value;
            }

            nameWithoutVersion = name;
            return null;
        }