AjaxControlToolkit.AnimationExtenderControlBase.TrimForDesigner C# (CSharp) Method

TrimForDesigner() static private method

static private TrimForDesigner ( string value ) : string
value string
return string
        static string TrimForDesigner(string value)
        {
            if(String.IsNullOrEmpty(value))
                return value;

            // Get the index of the first non-whitespace character
            int i;
            for(i = 0; i < value.Length; i++)
                if(!Char.IsWhiteSpace(value[i]))
                    break;

            // Remove any lines of just whitespace from the top
            i = value.LastIndexOf('\n', i);
            if(i >= 0)
                value = value.Substring(i + 1);

            // Trim anything else off the bottom
            return value.TrimEnd();
        }