Ti Wikipédia Sunda, énsiklopédi bébas
Documentation icon Dokuméntasi citakan[tempo] [édit] [jujutan] [beresihan]
Dokuméntasi citakan ieu ditransklusi tina Citakan:0/doc [edit]

Citakan:Commonstmp Inserts a visibility:hidden and color:transparent (i.e. invisible) zero (0) character. It is used for padding statistics and other numbers in table columns so that they line up properly.

The invisible zero may in fact be replaced by any other string (which regardless, is made invisible), by specifying the string as the first optional parameter. This is useful to "visually pad out" equivalent length rows in numeric columns in such tables. This is accomplished by inserting extra invisible zeroes, thousands separators, or decimal points prefixing and suffixing the numeric field, (adjusted to pad to the length of the largest numeric value) like in example one.

Example-1: Shows {{Template:0}} padding fields align decimal points in edit mode as well as what will be displayed) of varying length column row data...

{{0|0,000,0}}12{{0|.00}} km<br />
{{0|0,000,0}}24.{{0|00}} km<br />
{{0|0,000,}}212.5{{0|0}} km<br />
{{0|0,00}}3,212.51 km<br />
{{0|00,0}}12{{0|.00}} km<br />
{{0|00,0}}24.{{0|00}} km<br />
{{0|00,}}212.5{{0|0}} km<br />
{{0|0}}3,212.51 km<br />
{{0|}}6,789.01 km<br />

which gives:

0,000,012.00 km
0,000,024.00 km
0,000,212.50 km
0,003,212.51 km


00,012.00 km
00,024.00 km
00,212.50 km
03,212.51 km
6,789.01 km ↔ note the effect... of 'zero length' or null string in padding prefix. (Compare and contrast with way "3,212.51 mi" is commanded and then expressed below in example-two.)

example-2; Numbers columnized with Zero left padding of largest:

From the difference in the prefix calls (compare above and below example calls)... only the number of places consumed matters in the spacing that results.
   In short, the template cares not whether you specify comma, decimal points, or zero's:
{{0|,00.}}12{{0|00}} mi<br />
{{0|0,0}}24.{{0|00}} mi<br />
{{0|,0}}212.5{{0|0}} mi<br />
3,212.51 mi<br />
{{0|}}6,789.01 mi<br/>

which shows the usefulness of the null argument for aligning the column in edit mode


,00.1200 mi
0,024.00 mi
,0212.50 mi
3,212.51 mi
6,789.01 mi

These hidden characters are part of the string used for collation when sorting tables, even though they are not visible (but they still take space and numeric columns are correctly aligned as if they were present.