|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
clj83 Smarty Regular
Joined: 16 Oct 2009 Posts: 44
|
Posted: Thu Aug 04, 2011 8:19 am Post subject: Truncate Start Of String |
|
|
Hi,
Im not sure if this is possible but does anyone know a method to truncate a fixed number of characters off the start of a string. So for example
{$entry->foo|truncate:6:"":true}
Would reduce the string to 6 characters but I want to remove the first six characters and leave the rest of the string. Is this possible?
Thanks
Chris |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Thu Aug 04, 2011 12:40 pm Post subject: |
|
|
{$foo|substr:6|6} should give you 6 characters omitting the first 6 characters _________________ Twitter |
|
Back to top |
|
clj83 Smarty Regular
Joined: 16 Oct 2009 Posts: 44
|
Posted: Thu Aug 04, 2011 1:38 pm Post subject: Great |
|
|
Excellent, that works perfectly. Thanks so much for your help. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|