|
10.
|
|
|
Sort the selected text or whole document in natural order.<br>Here is an example to show the difference to the normal sort method:<br>sort(a10, a1, a2) => a1, a10, a2<br>natsort(a10, a1, a2) => a1, a2, a10
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/data/utils.js:308
|
|
11.
|
|
|
Trims trailing whitespace from selection or whole document.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/data/utils.js:310
|
|
12.
|
|
|
Trims leading whitespace from selection or whole document.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/data/utils.js:312
|
|
13.
|
|
|
Trims leading and trailing whitespace from selection or whole document.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/data/utils.js:314
|
|
14.
|
|
|
Joins selected lines or whole document. Optionally pass a separator to put between each line:<br><code>join ', '</code> will e.g. join lines and separate them by a comma.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/data/utils.js:316
|
|
15.
|
|
|
Removes empty lines from selection or whole document.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/data/utils.js:318
|
|
16.
|
|
|
Given a JavaScript function as argument, call that for the list of (selected) lines and replace them with the return value of that callback.<br>Example (join selected lines):<br><code>each 'function(lines){return lines.join(", ");}'</code><br>To save you some typing, you can also do this to achieve the same:<br><code>each 'lines.join(", ")'</code>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/data/utils.js:322
|
|
17.
|
|
|
Given a JavaScript function as argument, call that for the list of (selected) lines and remove those where the callback returns false.<br>Example (see also <code>rmblank</code>):<br><code>filter 'function(l){return l.length > 0;}'</code><br>To save you some typing, you can also do this to achieve the same:<br><code>filter 'line.length > 0'</code>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/data/utils.js:324
|
|
18.
|
|
|
Given a JavaScript function as argument, call that for the list of (selected) lines and replace the line with the return value of the callback.<br>Example (see also <code>ltrim</code>):<br><code>map 'function(line){return line.replace(/^\s+/, "");}'</code><br>To save you some typing, you can also do this to achieve the same:<br><code>map 'line.replace(/^\s+/, "")'</code>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/data/utils.js:326
|
|
24.
|
|
|
Error: can't open utils.js
|
|
|
|
(no translation yet)
|
|
|
|
Located in
script/katescriptconsole.cpp:61
|