Difference between revisions of "Template:Automatic archive navigator/Calc"

From blackwiki
Jump to navigation Jump to search
imported>Ash
m (Create)
 
imported>Ash
m (Add explanation)
Line 1: Line 1:
<!--Does the string begin with "Archive"? Returns 1 if true, null if not.
+
<includeonly><!--
 +
Check if length greater than 8, if not return null
 
-->{{#ifexpr:{{str len|{{{1}}} }}>8|<!--
 
-->{{#ifexpr:{{str len|{{{1}}} }}>8|<!--
see if prefix is Archive  
+
see if prefix matches "Archive"
-->{{#if:{{ifequal|{{str sub|{{{1}}}|0|7}}|Archive}}|1|}}|<!--
+
  -->{{#if:{{ifequal|{{str sub|{{{1}}}|0|7}}|Archive}}|1|}}|<!--
too short
+
-->}}</includeonly><noinclude>
-->}}
+
This function is used by {{tl|Aan/Next}} to work out if a given string begins with "Archive". Returns 1 if true, null if not.
 +
</noinclude>

Revision as of 23:09, 16 May 2009

This function is used by {{Aan/Next}} to work out if a given string begins with "Archive". Returns 1 if true, null if not.