ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV 2024 feature!
Help / WLanguage / WLanguage functions / Controls, pages and windows / 
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Finds and replaces a string in the Code Editor control.
Example
// Replaces calls to Info with calls to Trace
CODEEDT_NoName1.Replace("Info", "Trace", WholeWord)
CODEEDT_Example.DeleteAll()
sCode is string = [
sFile is string
info(sFile)
]
// Inserts code
CODEEDT_Example.Insert(1, sCode)

// Searches for a given text in the content of the Code Editor control
arrFind is array of int // Position of each occurrence in the text
CODEEDT_Example.Search()
IF arrFind.Count > 0 THEN
Info("'info' was found and will be replaced with 'error'.")
END
CODEEDT_Example.Replace("info", "error")
Syntax
<Code Editor control>.Replace(<Text to find> , <New text> [, <Options>])
<Code Editor control>: Control name
Name of the Code Editor control to be used.
<Text to find>: Character string
Text to find.
<New text>: Character string
Replacement text.
<Options>: Optional Integer constant
Search options for the word to be replaced:
IgnoreCaseCase and accent insensitive search (ignores uppercase and lowercase differences).
WholeWordWhole word search (enclosed in punctuation characters or spaces).

By default, search is case-sensitive.
Business / UI classification: UI Code
Component: wd290obj.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/07/2024

Send a report | Local help