- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
private String addZerosToColor(String color)
{
switch(color.length())
{
case 1:
color = (new StringBuilder()).append("00000").append(color).toString();
break;
case 2:
color = (new StringBuilder()).append("0000").append(color).toString();
break;
case 3:
color = (new StringBuilder()).append("000").append(color).toString();
break;
case 4:
color = (new StringBuilder()).append("00").append(color).toString();
break;
case 5:
color = (new StringBuilder()).append("0").append(color).toString();
break;
}
return color;
}
Мистер Хэнки 01.08.2010 08:55 # +3