Difference between revisions of "STUFF()"

From Lianjapedia
Jump to: navigation, search
 
(See Also)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to perform character replacement
 
Function to perform character replacement
 
  
 
==Syntax==
 
==Syntax==
 
STUFF(<expC1>, <expN1>, <expN2>, <expC2>)
 
STUFF(<expC1>, <expN1>, <expN2>, <expC2>)
 
  
 
==See Also==
 
==See Also==
[[AT()]], [[ATNEXT()]], [[INLIST()]], [[LEFT()]], [[LPAD()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[RPAD()]], [[SET STRESCAPE]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[SUBSTR()]]
+
[[AT()]], [[AT_C()]], [[ATNEXT()]], [[CHRTRAN()]], [[CHRTRANC()]], [[INLIST()]], [[LEFT()]], [[LEFTC()]], [[LEN()]], [[LENC()]], [[LPAD()]], [[OCCURS()]], [[RAT()]], [[RAT_C()]], [[RIGHT()]], [[RIGHTC()]], [[RPAD()]], [[SET STRESCAPE]], [[STR()]], [[STR_COMPRESS()]], [[STR_UNCOMPRESS()]], [[STREXTRACT()]], [[STRLEN()]], [[STRTRAN()]], [[STUFFC()]], [[SUBSTR()]], [[SUBSTRC()]]
 
+
  
 
==Description==
 
==Description==
 
The STUFF() function returns a character string which is the result of replacing a string in <expC1> with <expC2>.  The starting position for the replacement is <expN1>, and the number of characters to replace is <expN2>.  It can also be used to remove text from a string.
 
The STUFF() function returns a character string which is the result of replacing a string in <expC1> with <expC2>.  The starting position for the replacement is <expN1>, and the number of characters to replace is <expN2>.  It can also be used to remove text from a string.
 
  
 
==Example==
 
==Example==
Line 23: Line 19:
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:String Data]]
 
 
[[Category:String Data Functions]]
 
[[Category:String Data Functions]]

Latest revision as of 12:44, 22 March 2021

Purpose

Function to perform character replacement

Syntax

STUFF(<expC1>, <expN1>, <expN2>, <expC2>)

See Also

AT(), AT_C(), ATNEXT(), CHRTRAN(), CHRTRANC(), INLIST(), LEFT(), LEFTC(), LEN(), LENC(), LPAD(), OCCURS(), RAT(), RAT_C(), RIGHT(), RIGHTC(), RPAD(), SET STRESCAPE, STR(), STR_COMPRESS(), STR_UNCOMPRESS(), STREXTRACT(), STRLEN(), STRTRAN(), STUFFC(), SUBSTR(), SUBSTRC()

Description

The STUFF() function returns a character string which is the result of replacing a string in <expC1> with <expC2>. The starting position for the replacement is <expN1>, and the number of characters to replace is <expN2>. It can also be used to remove text from a string.

Example

? stuff("Life is as you take it",9,13, "grea")
Life is great
? stuff("Friends are welcome",9,7, "")
Friends come