User Tools

Site Tools


syntax:functions:keepbefore

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
syntax:functions:keepbefore [2021/08/02 01:22] craigtsyntax:functions:keepbefore [2021/08/14 22:09] (current) – [Examples] craigt
Line 32: Line 32:
 =====Examples===== =====Examples=====
  
-  keepbefore('5pm', 'pm''5' +  keepbefore('5pm', 'pm'//Returns '5' 
-  keepbefore('October 2015', '2015''October '  //Note the space after 'October' is retained + 
-  keepbefore('a/a/b/b/c/d', 'b/''a/a/'  //Second argument can be multiple characters +  keepbefore('October 2015', '2015'//Returns 'October '  (Note the space after 'October' is retained
-  keepbefore('a/b/c/d', '/', 2) 'a/b'  //Keep text before the second instance of '/' + 
-  keepbefore('a/b/c/d', '/', -1) 'a/b/c'  //Keep text before the second instance of '/', from the end +  keepbefore('a/a/b/b/c/d', 'b/'//Returns 'a/a/'  (Second argument can be multiple characters
-  keepbefore('a/b/c/d', 'z'(empty)  //'z' not found within the text value+ 
 +  keepbefore('a/b/c/d', '/', 2) //Returns 'a/b'  (Keep text before the second instance of '/'
 + 
 +  keepbefore('a/b/c/d', '/', -1) //Returns 'a/b/c'  (Keep text before the second instance of '/', from the end
 + 
 +  keepbefore('a/b/c/d', 'z'//Returns (empty)  ('z' not found within the text value)
  
 \\  \\ 
syntax/functions/keepbefore.txt · Last modified: 2021/08/14 22:09 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki