254
edits
Line 296: | Line 296: | ||
|contains(find, text)||boolean||Returns true if '''find''' is found in '''text'''.<br>Example: contains('bcd', 'abcdef') = true | |contains(find, text)||boolean||Returns true if '''find''' is found in '''text'''.<br>Example: contains('bcd', 'abcdef') = true | ||
|- | |- | ||
|copy(text, start[, length])|| | |copy(text, start[, length])||string||Returns '''length''' letters from letter number '''start''' of '''text'''.<br>Example: copy('abcdefgh', 3, 2) = 'cd' | ||
|- | |- | ||
|if(test, trueval[, falseval])||any||If statement, returns '''trueval''' if '''test''' is true, otherwise returns '''falseval'''.<br> Example: if(23=23, 'equal', 'not equal') = 'equal' | |if(test, trueval[, falseval])||any||If statement, returns '''trueval''' if '''test''' is true, otherwise returns '''falseval'''.<br> Example: if(23=23, 'equal', 'not equal') = 'equal' | ||
Line 302: | Line 302: | ||
|in(find, text...)||boolean||Checks if '''find''' is present in a number of '''text''' parameters.<br>Example: in('bb', 'aa', 'bb', 'cc', 'dd') = true | |in(find, text...)||boolean||Checks if '''find''' is present in a number of '''text''' parameters.<br>Example: in('bb', 'aa', 'bb', 'cc', 'dd') = true | ||
|- | |- | ||
|join(glue, text...)|| | |join(glue, text...)||string||Joins together two or more '''text'''s, empty parameters are ignored with no glue added.<br>Example: join(' ', 'a', 'b', 'c') = 'a b c' | ||
|- | |- | ||
|lc(text)|| | |lc(text)||string||Converts '''text''' to lower case.<br>Example: lc('ABCDEF') = 'abcdef' | ||
|- | |- | ||
|length(text)||number||Returns the length of '''text'''.<br>Example: length('abcdef') = 6 | |length(text)||number||Returns the length of '''text'''.<br>Example: length('abcdef') = 6 | ||
|- | |- | ||
|limit(text, length[, end])|| | |limit(text, length[, end])||string||Limits the length of '''text''' to at most '''length''' characters. '''End''' is optional, if specified and the text is cropped, it'll be added at the end of text.<br>Example: limit(e, 100) or limit('abcdefghijklmnop', 7, '...') = 'abcd...' | ||
|- | |- | ||
|min(number...)||number||Returns the lowest supplied number<br>Example: min(1, 7, 3, 9, 2) = 1 | |min(number...)||number||Returns the lowest supplied number<br>Example: min(1, 7, 3, 9, 2) = 1 | ||
Line 314: | Line 314: | ||
|max(number...)||number||Returns the highest supplied number<br>Example: max(1, 7, 3, 9, 2) = 9 | |max(number...)||number||Returns the highest supplied number<br>Example: max(1, 7, 3, 9, 2) = 9 | ||
|- | |- | ||
|pad(text)|| | |pad(text)||string||Converts text to sentence case.<br>Example ?sc(a) | ||
|- | |- | ||
|padl(text)|| | |padl(text)||string||Converts text to sentence case.<br>Example ?sc(a) | ||
|- | |- | ||
|padr(text)|| | |padr(text)||string||Converts text to sentence case.<br>Example ?sc(a) | ||
|- | |- | ||
|sc(text)|| | |sc(text)||string||Converts '''text''' to sentence case.<br>Example: sc('HELLO THERE!') = 'Hello there!' | ||
|- | |- | ||
|set(name, data)||nothing||Declares a new variable called '''name''' containing '''data'''.<br>Example: set('temp', 'text') | |set(name, data)||nothing||Declares a new variable called '''name''' containing '''data'''.<br>Example: set('temp', 'text') | ||
|- | |- | ||
|split(text, find, index)|| | |split(text, find, index)||string||Splits '''text''' on '''find''' and returns the specified '''index'''. Index starts from 1.<br>Example: split('2011-05-19', '-', 2) = 05 | ||
|- | |- | ||
|start(text, find)||boolean||Checks if '''find''' matches the start of '''text'''.<br>Example: start('1999', '199') = true | |start(text, find)||boolean||Checks if '''find''' matches the start of '''text'''.<br>Example: start('1999', '199') = true | ||
|- | |- | ||
|tc(text)|| | |tc(text)||string||Converts '''text''' to title case.<br>Example: tc('HELLO THERE!') = 'Hello There!' | ||
|- | |- | ||
|uc(text)|| | |uc(text)||string||Converts '''text''' to upper case.<br>Example: uc('abcd') = 'ABCD' | ||
|} | |} | ||
edits