Click or drag to resize

MBStuff Function

X#
Insert a string into another string, optionally deleting a specified number of characters from the original string — both strings can contain double-byte characters.

Namespace:  XSharp.VO
Assembly:  XSharp.VO (in XSharp.VO.dll) Version: 2.19
Syntax
 FUNCTION MBStuff(
	cMBTarget AS STRING,
	wStart AS DWORD,
	wDelete AS DWORD,
	cMBInsert AS STRING
) AS STRING
Request Example View Source

Parameters

cMBTarget
Type: String
The string into which characters are inserted and deleted.
wStart
Type: DWord
The position in cMBTarget where the insertion/deletion occurs.
wDelete
Type: DWord
The number of characters to delete — each double-byte character counts as one character.
cMBInsert
Type: String
The string to insert.

Return Value

Type: String
cMBTarget with the specified characters deleted and cMBInsert inserted.
Remarks
This function is like Stuff() except that it handles strings containing double-byte characters.
Remarks
Tip Tip
This function is the same as Stuff() since .Net has unicode strings
Examples