AniDB O'Matic - Documentation: Local file renaming: Difference between revisions

Jump to navigation Jump to search
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])||text||Returns '''length''' letters from letter number '''start''' of '''text'''.<br>Example: copy('abcdefgh', 3, 2) = 'cd'
|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...)||text||Joins together two or more '''text'''s, empty parameters are ignored with no glue added.<br>Example: join(' ', 'a', 'b', 'c') = 'a b c'
|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)||text||Converts '''text''' to lower case.<br>Example: lc('ABCDEF') = 'abcdef'
|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])||text||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...'
|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)||text||Converts text to sentence case.<br>Example ?sc(a)
|pad(text)||string||Converts text to sentence case.<br>Example ?sc(a)
|-
|-
|padl(text)||text||Converts text to sentence case.<br>Example ?sc(a)
|padl(text)||string||Converts text to sentence case.<br>Example ?sc(a)
|-
|-
|padr(text)||text||Converts text to sentence case.<br>Example ?sc(a)
|padr(text)||string||Converts text to sentence case.<br>Example ?sc(a)
|-
|-
|sc(text)||text||Converts '''text''' to sentence case.<br>Example: sc('HELLO THERE!') = 'Hello there!'
|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)||text||Splits '''text''' on '''find''' and returns the specified '''index'''. Index starts from 1.<br>Example: split('2011-05-19', '-', 2) = 05
|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)||text||Converts '''text''' to title case.<br>Example: tc('HELLO THERE!') = 'Hello There!'
|tc(text)||string||Converts '''text''' to title case.<br>Example: tc('HELLO THERE!') = 'Hello There!'
|-
|-
|uc(text)||text||Converts '''text''' to upper case.<br>Example: uc('abcd') = 'ABCD'
|uc(text)||string||Converts '''text''' to upper case.<br>Example: uc('abcd') = 'ABCD'
|}
|}


254

edits

Navigation menu

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.