npm install dustmotes-substr``
{@substr str=string begin=b end=e len=l /}
str - String
begin - starting character position
end - ending character position
len - length of substring
`
`
{@substr str="abcdefg" begin="0" end="3"/}
Output: abc
{@substr str="abcdefg" begin="1" len="4"/}
Output: bcde
``
In node.js:
require('dustmotes-iterate');
In browser:
If not using require, load the JS some other way and call it with the dust object. As noted earlier,
dustjs-helpers must be loaded earlier.