Template:Sbp.func.empty

From Tetherless World Wiki

Jump to: navigation, search

Description

Help:Sbp.func.empty Template:Sbp.func.empty
{{sbp.func.empty
  |v=           # the value to be evaluated
  |length=   # the actual length of v

  |out_empty =      # if v is empty string, print this value. Default print '0'
  |out_some=        # if v is non-empty string, print this value. Default print '1'
  |out_null=        # if v is null (not a string at all), print this value. Default print '2'
  |out_default=     # if v is non-empty string, but its actual length is 0, print this value. Default print '3'
}}

Note: This template can be used to evaluate the value of a named parameter in a template.


Personal tools