Last modified: 2011-03-13 18:05:04 UTC
{{ #substr: str | pos | len }} == {{ #mid: str | pos | len }} {{ #substr: abcdef | 1 | 3 }} --> bcd {{ #substr: abcdef | 1 }} --> bcdef {{ #substr: abcdef | 0 | 3 }} --> abc * The "pos" and "len" can also be negative, and have the same behavior as php's substr() {{ #head: str | len }} == {{ #left | len }} == {{ #substr: str | 0 | len }} {{ #tail: str | len }} == {{ #right | len }} == {{ #substr: str | -len }} If you need patch, I'm going to implement it.
Add one more common function, * {{ #len: str }} == {{ #strlen: str }} == {{ #length: str }}
strlin and substr already exist in StringFunctions extension. I'm not sure about head and tail, but they should be easily acheivable with that extension as well.
WONFIX: see comment #2