Click or drag to resize

StuffC Function

X#
Returns a character string created by replacing a specified number of characters in a character expression with another character expression.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION StuffC(
	cExpression,
	nStartReplacement,
	nCharactersReplaced,
	cReplacement
) AS STRING CLIPPER
Request Example View Source

Parameters

cExpression (Optional)
Type: Usual
Specify the character expression in which the replacement occurs.
nStartReplacement (Optional)
Type: Usual
Specifies the character position in cExpression where the replacement begins.
nCharactersReplaced (Optional)
Type: Usual
Specifies the number of characters to be replaced. If nCharactersReplaced is 0, the entire replacement string cReplacement is inserted into cExpression.
cReplacement (Optional)
Type: Usual
Specifies the replacement character expression. If cReplacement is the empty string, the number of characters specified by nCharactersReplaced are removed from cExpression.

Return Value

Type: String
Character
Remarks
StuffC( ) is designed for expressions containing double-byte characters. If the expression contains only single-byte characters, StuffC( ) is equivalent to Stuff( ).
StuffC( ) returns a character string created by replacing a specified number of characters in a character expression with another character expression. The character expressions can consist of any combination of single-byte and double-byte characters.
This function is useful for manipulating double-byte character sets for languages such as Hiragana and Katakana.
See Also