mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
typo-hunting v2
This commit is contained in:
parent
ea51ae8dcb
commit
311965089e
4 changed files with 8 additions and 8 deletions
|
@ -106,7 +106,7 @@ module.exports.random = function (max) {
|
|||
return r;
|
||||
};
|
||||
|
||||
// Split a comma seperated string, ignoring commas in quotes.
|
||||
// Split a comma separated string, ignoring commas in quotes.
|
||||
module.exports.quoteSplit = function (str) {
|
||||
var tmp = '', quote = 0, result = [];
|
||||
for (var i in str) { if (str[i] == '"') { quote = (quote + 1) % 2; } if ((str[i] == ',') && (quote == 0)) { tmp = tmp.trim(); result.push(tmp); tmp = ''; } else { tmp += str[i]; } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue