syntax:functions:keepbefore
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
syntax:functions:keepbefore [2015/04/03 17:43] – elenap | syntax:functions:keepbefore [2021/03/23 19:07] – dmitry | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== KeepBefore(text, | ====== KeepBefore(text, | ||
- | Returns characters before the first occurrence of specific //string// in predetermined | + | Returns characters before 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: | ||
| KeepBefore( ' | | KeepBefore( ' | ||
| keepbefore(' | | keepbefore(' | ||
+ | |||
+ | 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 | ||
+ | | KeepBefore( ' | ||
+ | | keepbefore( ' | ||
=== See also === | === See also === | ||
* [[syntax: | * [[syntax: | ||
* [[syntax: | * [[syntax: |
syntax/functions/keepbefore.txt · Last modified: 2021/08/14 22:09 by craigt