}
if(strSubFld == null)
return 0;
return 1;
}
//从字段中获得出现次数字段组
// -1 error
// 0 not found
// 1 found
public int GetFieldGroup(string strFld,
int nIndex,
out string strGroup)
{
strGroup = null;
if(strFld == null)
return -1;
char[] chData = strFld.ToCharArray();
int nPos = 0;
string strSplit = "a"; // 一般以a子字段为字段组区分
int nFound = 0; // 0: not 1: first time found 2: second time found
while( nPos < chData.Length)
{
nPos ++;
if((chData[nPos-1] == SUBFLD) && (chData[nPos].ToString() == strSplit))
nFound ++; // found
if (nFound == nIndex)
strGroup += chData[nPos].ToString();
if(nFound > nIndex)
break;
}
if(strGroup == null)
return 0;
return 1;
}
//获得字符的长度
//
private int GetCharLength(char ch)
{
int nLength = 0;
if((short)ch < 0 || (short)ch > 128)
{
nLength += 2;
}
else
{
nLength = nLength + 1;
}
return nLength;
}
public string strMarc
{
get
{
return m_strMarc;
}
set
{
m_strMarc = value;
}