improve efficiency of addressbook parser

This commit is contained in:
zzz
2014-09-15 18:28:35 +00:00
parent 3781b8db09
commit ceab4f1ffc

View File

@@ -64,10 +64,11 @@ class ConfigParser {
if (inputLine.startsWith(";")) { if (inputLine.startsWith(";")) {
return ""; return "";
} }
if (inputLine.split("#").length > 0) { int hash = inputLine.indexOf('#');
return inputLine.split("#")[0]; if (hash >= 0) {
return inputLine.substring(0, hash);
} else { } else {
return ""; return inputLine;
} }
} }