mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 19:57:27 -08:00
Parsing wasn't correctly ignoring the ':' in prefix!
git-svn-id: https://zxing.googlecode.com/svn/trunk@339 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
0e7872020c
commit
28ea8e02f0
|
@ -54,15 +54,15 @@ public final class AddressBookAUParsedResult extends ParsedReaderResult {
|
|||
String[] names = matchMultipleValuePrefix("NAME", 2, rawText);
|
||||
String[] phoneNumbers = matchMultipleValuePrefix("TEL", 3, rawText);
|
||||
String[] emails = matchMultipleValuePrefix("MAIL", 3, rawText);
|
||||
String note = AbstractDoCoMoParsedResult.matchSinglePrefixedField("MEMORY", rawText, '\r');
|
||||
String address = AbstractDoCoMoParsedResult.matchSinglePrefixedField("ADD", rawText, '\r');
|
||||
String note = AbstractDoCoMoParsedResult.matchSinglePrefixedField("MEMORY:", rawText, '\r');
|
||||
String address = AbstractDoCoMoParsedResult.matchSinglePrefixedField("ADD:", rawText, '\r');
|
||||
return new AddressBookAUParsedResult(names, phoneNumbers, emails, note, address);
|
||||
}
|
||||
|
||||
private static String[] matchMultipleValuePrefix(String prefix, int max, String rawText) {
|
||||
Vector values = null;
|
||||
for (int i = 1; i <= max; i++) {
|
||||
String value = AbstractDoCoMoParsedResult.matchSinglePrefixedField(prefix + i, rawText, '\r');
|
||||
String value = AbstractDoCoMoParsedResult.matchSinglePrefixedField(prefix + i + ':', rawText, '\r');
|
||||
if (value == null) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue