DungeonMasterParser.DungeonData.GetKey C# (CSharp) Method

GetKey() private static method

private static GetKey ( string s ) : string
s string
return string
        private static string GetKey(string s)
        {
            Func<string, int> getLength = str =>
            {
                var length = str.IndexOfAny(new[] { '/', '\n', '\r', '(' });

                if (length == -1)
                    length = str.Length;
                return length;
            };

            return s.Substring(0, getLength(s)).Trim();
        }