Programming Reference Manual
ReplaceString
Syntax
ReplaceString$(
Work$
,
OldStr$
,
NewStr$
)
Description
Replaces
oldstr$
in the string
work$
with
newstr$
, and returns the new modified string.
NOTE: The function is case-insensitive, see the example below.
Parameter
Description
work$
This string value is searched. Replacements are made in the string returned by Replace.
oldstr$
This string value is the pattern to look for.
newstr$
This string value is the replacement.
See Also
BulkReplace
,
InStr
,
InStrRev
,
Left$
,
Len
,
Mid$
,
Right$
, Replace
,
StringClass.Replace
.
Example
Sub
Main
Debug
.
Print
ReplaceString
$(
"abcabc"
,
"b"
,
"B"
)
'"aBcaBc"
End
Sub
Home
IDE Overview
Declarations
Data Types
Assignment
Flow Control
Error Handling
Conversion
Variable Info
Constant
Math
Financial
Strings
Strings
Asc
AscB
AscW
Chr
ChrB
ChrW
Format
FmtName
InStr
InStrB
InStrRev
Join
LCase
Left
LeftB
Len
LenB
LTrim
Mid
MidB
Replace
ReplaceString
Right
RightB
RTrim
Space
Split
StrComp
StrConv
String
StrReverse
Trim
UCase
StringClass
Objects
Time/Date
File
User Input
User Dialog
Dialog Functions
Web Form
CCL (web server)
DDE
Settings
Miscellaneous
Operator
Translator