%ReplaceStr function


Function
The function replaces one substring by other one in the input string.
Declaration
TEXT %ReplaceStr(
   TEXT in text, 
   TEXT in sub1, 
   TEXT in sub2, 
   BOOL in ReplaceAll
 )

Parameters
text Text.
sub1 String that to be replaced by a new one.
sub2 String that replaces previous one.
timeA @TRUE - replace all occurrence of sub1.
@FALSE - replace the first occurrence from the left only.

Example
%ReplaceStr("Name : % or %","%","John",@FALSE)   ; returns text: "Name : John or %" 
 
 %ReplaceStr("Name : % or %","%","John",@TRUE)    ; returns text: "Name : John or John" 

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .