Skip to content

Instantly share code, notes, and snippets.

@espenak
Created August 13, 2011 16:52
Show Gist options
  • Save espenak/1144030 to your computer and use it in GitHub Desktop.
Save espenak/1144030 to your computer and use it in GitHub Desktop.
parseTextToPairList: function(rawValue) {
var asArray = rawValue.split('\n');
var resultArray = [];
var me = this;
Ext.Array.each(asArray, function(line) {
line = Ext.String.trim(line);
var split = line.split(/\s*:\s*/, 2);
resultArray.push(split);
});
return resultArray;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment