You are on page 1of 1

private string getString(string str, int justification)

{
int maxLength=22;
string tmpStr = "";
switch (justification)
{
case 1://LEFT_JST:
break;
case 2:// RIGHT_JST:

for (int i = 0; i < maxLength - str.Length; i++)


{
tmpStr = tmpStr + " ";
}
str = tmpStr + str;
break;
case 3:// CENTER_JST:
int len = (maxLength / 2) - (str.Length / 2) + 1;
for (int i = 0; i < len; i++)
{
tmpStr = tmpStr + " ";
}
str = tmpStr + str;
break;
case 4:// NO_JST:

break;
}
return str;
}

You might also like