File: join%28%29.xml

package info (click to toggle)
datatables.js 1.10.13%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,232 kB
  • ctags: 1,329
  • sloc: xml: 10,249; php: 4,387; sh: 492; makefile: 21
file content (34 lines) | stat: -rw-r--r-- 1,539 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="UTF-8" ?>
<dt-api group="utility">
	<name>join()</name>
	<summary>Join the elements in the result set into a string.</summary>
	<since>1.10</since>

	<type type="function">
		<signature>join( separator )</signature>
		<description>Join the elements in the API instance's result set into a string.</description>
		<parameter type="string" name="separator">
			The string that will be used to separate each element of the result set.
		</parameter>
		<returns type="string">Contents of the instance's result set joined together as a single string.</returns>
	</type>

	<description>
		This method operates in exactly the same way as the Javascript array `join` method, combining the contents of the array (in this case the API instance) into a single string.

		This method makes use of the fact that DataTables API objects are "array like", in that they inherent a lot of the abilities and methods of the Javascript `Array` type.

		In this case, this method is a proxy for the Javascript `Array.prototype.join` method and is provided as a utility method for the DataTables API. For more information about the original method, please refer to the [Mozilla MDN documentation for concat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
	</description>

	<example title="Create a comma separated string of the data in a column"><![CDATA[
var table = $('#example').DataTable();

var combinedData = table
	.column( 0 )
	.data()
	.join( ', ' );

]]></example>

</dt-api>