TinyMCE:API/tinymce/explode

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Method: explode

(Requires: 3.0.5)

Summary

This method will split a string into an array of items by the specified delimiter. The difference between this one and the split function that the String object has is that this one will automatically trim any white space for the values.

Syntax

<Array> explode(<string> s, <string> d)

Parameters

s
String to split into an array.
d
Optional delimiter to split by, defaults to ",".

Examples

// Split a string into an array with a,b,c
var arr = tinymce.explode('a, b,   c');
Personal tools