Sybernet / Supplied Functions Reference
Release 3.00
Oct 14, 2002
backwards forwards

HTTP.STUFF

The stuff function inserts a string into another string. It deletes a specified length of characters in expr1 at the start position. It then inserts expr2 string into expr1 string at the start position. If the start position or the length is negative, a NULL string is returned.

If the start position is longer than expr1, a NULL string is returned. If the length to delete is longer than expr1, it is deleted through the last character in expr1

Syntax

FUNCTION STUFF
(
    CHAR_EXPR1                    VARCHAR2
,   START                         NUMBER
,   LENGTH                        NUMBER
,   CHAR_EXPR2                    VARCHAR2
)
RETURN VARCHAR2;

Parameters

Parameter Description
char_expr1
 
The string to be modified and returned
start
 
The one-relative starting position in char_expr1
length
 
The number of characters from start to be deleted
char_expr2
 
The string to be inserted into char_expr1

Returns

The result as a VARCHAR2.

Example 1

The following example illustrates how to insert characters into a string:

select http.stuff('HelloWorld',6,0,' ') from dual


-------------------------------------------------
Hello World


Example 2

The following example illustrates how to delete characters from a string:

select http.stuff('HelloWorld',4,6,NULL) from dual


-------------------------------------------------
Held



Sybernet is a trademark of SRI International.
Copyright © 1996-2008 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/