1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Template Syntax: Calculate string length possible?

Discussion in 'XenForo Development Discussions' started by Timeout, Jan 12, 2014.

  1. Timeout

    Timeout Member

    is there a helper, a tag or a simple trick to calculate the length of a given string?

    i tried:
    Code:
    {xen:helper length, $variable}
    {xen:string length, $variable}
    {$variable.length}
    but nothing worked.
    I also couldn't find anything in /library/XenForo/Helper/String.php

    any ideas?
     
  2. Vincent Gabriel

    Vincent Gabriel Active Member

    Try:

    PHP:
    {xen:helper strlen$variable}
     
  3. Timeout

    Timeout Member

    works. thanx. (y)
     

Share This Page