.net - Append html space algorithm -


This question

is on the line

We have an old code base and CSS Can not be used. When a whole column is empty in the table, the resulting table is very ugly. We have a text email solution that adds empty space to end a word at the end, in which the remaining letters are set, which you can use for the new string Specify using. Since the new string only takes one character, it was seeing that 1 liner, people with small types of examples can come up with it.

We use .NET 3.5sp1

  public function stringings (string data as volt data, size by size is small, use well valued full boolean ) If the data in the form of a string. Langs & gt; Return shape then (data, size - 4) & amp; "..." Otherwise if usehtml then 'small algorithms here (& amp; nbsp;) or return data;  

If you actually If you want to & amp; Nbsp; If you want a pad with - OK, clear - I'm not sure that this is a great idea, but something like this (C # Sorry):

  int count = Size - data.Length; Stringbilder sb = new stringbilder (data, data. Lang + (6 * count); For (int i = 0; i  

The following is a bad method to do this in line with LINQ; Only includes for interest:

  string s = data + string Canakat (Enumerator Rept ("& amp; nbsp;", Size - Data. Lang) .Oere ());  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -