AfxStrReplacefunction
Replaces all the occurrences of a string with another string. Case sensitive.
Syntax
FUNCTION AfxStrReplace (BYREF wszMainStr AS CONST WSTRING, BYREF wszMatchStr AS CONST WSTRING, BYREF wszReplaceWith AS CONST WSTRING) AS DWSTRING
Parameters
| Name | Description | |
|---|---|---|
wszMainStr | The main string from which you want to replace the specified string. | |
wszMatchStr | The string expression to be replaced. | |
wszReplaceWith | The replacement string. |
Description
Replaces all the occurrences of wszMatchStr in wszMainstr with the contents of wszReplaceWith. Case sensitive.
Example
DIM dws AS DWSTRING = AfxStrReplace("Hello World", "World", "Earth") ' Returns "Hello Earth"
Reference
- Include file
AfxStr.inc - Defined in AfxNova/AfxStr.inc:304
- Documented in String Management/String Procedures.md
- Topic: String Procedures