Exemplo n.º 1
0
        private static string _CreateStringKey(PSObject psoKey)
        {
            string stringKey = FormatAltSingleLineCommand.FormatSingleLineDirect(psoKey);

            stringKey = CaStringUtil.StripControlSequences(stringKey);

            // For string objects, Format-AltSingleLine will yield something with quotes
            // around it. Let's take them off. Perhaps we should check if psoKey's
            // BaseObject is a string first?
            if ((stringKey.Length > 0) &&
                ('"' == stringKey[0]) &&
                ('"' == stringKey[stringKey.Length - 1]))
            {
                stringKey = stringKey.Substring(1, stringKey.Length - 2);
            }
            return(stringKey);
        } // end _CreateStringKey()
Exemplo n.º 2
0
        } // end MakeFixedWidth()

        public static string StripPrerenderedColor(string prerendered)
        {
            return(CaStringUtil.StripControlSequences(prerendered));
        } // end StripPrerenderedColor()