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(";")) {
return "";
}
if (inputLine.split("#").length > 0) {
return inputLine.split("#")[0];
int hash = inputLine.indexOf('#');
if (hash >= 0) {
return inputLine.substring(0, hash);
} else {
return "";
return inputLine;
}
}