Interface AustraliaPostCustomerInformationDecoder
Interface AustraliaPostCustomerInformationDecoder
Namespace: Aspose.BarCode.BarCodeRecognition
Assembly: Aspose.BarCode.dll (25.1.0)
用于解码澳大利亚邮政符号中的客户信息字段的公共接口。实现应由用户提供。
public interface AustraliaPostCustomerInformationDecoder
方法
Decode(string)
从澳大利亚邮政符号中解码客户信息字段。 可用于从 NTable 和 CTable 编码中进行不同的数据解释。 数据以一行条形值提供:0、1、2 或 3。
string Decode(string customerInformationField)
参数
customerInformationField
string
编码为原始条形值行的客户信息字段:0、1、2 或 3
返回
解码后的客户信息字段字符串
示例
此示例演示如何使用 AustraliaPostCustomerInformationDecoder 接口解码数据
string[] N_Table = { "00", "01", "02", "10", "11", "12", "20", "21", "22", "30" };
public string Decode(string customerInformationField)
{
StringBuilder bd = new StringBuilder();
for (int i = 0; customerInformationField.Length > i; i += 2)
{
if (customerInformationField.Length >= i + 2)
{
string tmp = customerInformationField.Substring(i, 2);
for (int j = 0; N_Table.Length > j; j++)
{
if (N_Table[j].Equals(tmp))
{
bd.Append(j);
break;
}
}
}
}
return bd.ToString();
}