Mono.Terminal.TrimLabel.SetString C# (CSharp) Méthode

SetString() private méthode

private SetString ( int w, string s ) : void
w int
s string
Résultat void
        void SetString(int w, string s)
        {
            if ((Fill & Fill.Horizontal) != 0)
                w = Container.w - Container.Border * 2 - x;

            this.w = w;
            if (s.Length > w){
                if (w < 5)
                    text = s.Substring (0, w);
                else {
                    text = s.Substring (0, w/2-2) + "..." + s.Substring (s.Length - w/2+1);
                }
            } else
                text = s;
        }