BlenderRenderController.MainForm.compareParts C# (CSharp) Method

compareParts() public method

public compareParts ( string a, string b ) : int
a string
b string
return int
        public int compareParts(string a, string b)
        {
            Regex pattern = new Regex(@"-(.*)\.(mp4|avi)");

            int aEnd = Convert.ToInt32(pattern.Match(a).Groups[1].Value);
            int bEnd = Convert.ToInt32(pattern.Match(b).Groups[1].Value);

            return aEnd.CompareTo(bEnd);
        }