PowerArgs.CommandLineArgument.GenerateShortcutAlias C# (CSharp) Method

GenerateShortcutAlias() private static method

private static GenerateShortcutAlias ( string baseAlias, List excluded, bool ignoreCase ) : string
baseAlias string
excluded List
ignoreCase bool
return string
        private static string GenerateShortcutAlias(string baseAlias, List<string> excluded, bool ignoreCase)
        {
            string shortcutVal = "";
            foreach (char c in baseAlias.Substring(0, baseAlias.Length - 1))
            {
                shortcutVal += c;
                if (excluded.Contains(shortcutVal, new CaseAwareStringComparer(ignoreCase)) == false)
                {
                    return shortcutVal;
                }
            }
            return null;
        }