-4
我需要解析的長字符串使用此模式:解析字符串以固定寬度的字段,但不同長度
1)'*' (text,len:1)
2)accountCount (number,len:2)
3)accountNumber1 (text,len:20)
4)accountNumber2 (text,len:20)
5)accountNumber3 (text,len:20)
6)accountNumber4 (text,len:20)
...
?)accountNumber'$accountCount' (text,len:20)
?)'^' (text,len:1)
正如你所看到的,使用accountNumber字段將在「accountCount」次重複。
什麼是爲我的String
申報班級並設置accountCount,accountNumber1,accountNumber2,accountNumber3,...
屬性的最佳方式?