Smart line substr skips first characters

The $siteroot contains a line that looks like this:

http://www.example.nl/folder/

To get the http://www.example.nl/ part, you use:

{$siteroot|substr:0:22}

But I want to skip this part and return / folder /

The folder length is unknown.

+6
source share
2 answers
 {$siteroot|substr:22} 

Must work

+9
source
 {assign var="bar_at" value=$siteroot|strpos:"nl/"} {$siteroot|substr:$bar_at+2} 
+1
source

All Articles