String#w()

w (str) Arraypublic

Defined in packages/ember-runtime/lib/system/string.js:206

Splits a string into separate units separated by spaces, eliminating any empty strings in the process. This is a convenience method for split that is mostly useful when applied to the String.prototype.

Ember.String.w("alpha beta gamma").forEach(function(key) {
  console.log(key);
});

// > alpha
// > beta
// > gamma

Parameters:

str String
The string to split

Returns:

Array
array containing the split strings
doc_EmberJs
2016-11-30 16:53:30
Comments
Leave a Comment

Please login to continue.