/// <summary>
/// 左補右補功能
/// </summary>
/// <param name="str">待處理字符串</param>
/// <param name="expad_type">待補類型(L:左補,R:右補)</param>
/// <param name="conLength">總長度</param>
/// <param name="PadChar">補滿內容</param>
private static void StrPadding(ref string str, string expad_type, int conLength, char PadChar)
{
if (str.Length >= conLength)
{
str = str.Substring(0, conLength);
}
else
{
if (expad_type.ToUpper() == "L")
{
str = str.PadLeft(conLength, PadChar);
}
else
{
str = str.PadRight(conLength, PadChar);
}
}
}