User Tools

Site Tools


syntax:functions:replace

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
syntax:functions:replace [2021/08/16 02:13] craigtsyntax:functions:replace [2021/09/08 14:19] (current) – [Remarks] craigt
Line 22: Line 22:
  
 Number values entered for //text//, //old_text//, and //new_text// are implicitly converted to text. Number values entered for //text//, //old_text//, and //new_text// are implicitly converted to text.
- 
-\\  
-**Multiple numeric 0s (zeroes) as //old_text// or //new_text//**\\ 
-Use caution when searching for, or replacing with, a numeric value of multiple zeroes, such as 000.  These values are implicitly converted to a //single zero// in text form and will search for/replace with a single zero.  To search for or replace using multiple zeros, enter the value as text, using quotes.   
- 
-  replace(123456,345,000) //Returns 1206, as the 000 is converted to a single 0. 
- 
-  replace(120056, 00, 99) //Returns 12999956, as the 00 is converted to 0 and replaced with 99 in each instance. 
-\\  
-To remedy this issue, enter the 000 and 00 values as text:  "000" and "00", respectively. 
-  replace(123456,345,'000') //Returns 120006, as expected. 
- 
-  replace(120056, '00', 99) //Returns 129956, as expected.  
  
 \\  \\ 
syntax/functions/replace.txt · Last modified: 2021/09/08 14:19 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki