User Tools

Site Tools


syntax:functions:keepafter

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
syntax:functions:keepafter [2015/04/03 17:39] elenapsyntax:functions:keepafter [2021/03/23 19:07] dmitry
Line 1: Line 1:
 ====== KeepAfter(text, string) ====== ====== KeepAfter(text, string) ======
  
-Returns characters after the first occurrence of specific //string// in the given //text//. Parameter //string// must be not empty.+Returns characters after the first occurrence of specific //string// in //text//. Parameter //string// must not be empty.
 This function is case-sensitive.  This function is case-sensitive. 
  
Line 7: Line 7:
 |  KeepAfter( 'New York', 'Y' )  |  ork  | |  KeepAfter( 'New York', 'Y' )  |  ork  |
 |  keepafter( 'Food&Beverage', '&' )  |  Beverage  | |  keepafter( 'Food&Beverage', '&' )  |  Beverage  |
 +
 +The functions can have the optional third parameter with the index of the separator. The index can be negative - in this case, it's counted from the end of the text.
 +
 +^  Example  ^  Result  ^
 +|  KeepAfter( 'a/b/c/d', '/', 2)  |  'c/d'  |
 +|  KeepAfter( 'a/b/c/d', '/', -1)  |  'd'  |
  
 === See also === === See also ===
   * [[syntax:functions:keepbefore]]   * [[syntax:functions:keepbefore]]
   * [[syntax:functions:removeend]]   * [[syntax:functions:removeend]]
syntax/functions/keepafter.txt · Last modified: 2021/12/23 05:35 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki