|
|
|
|
|
CodeEditorSearch (Function) In french: EditeurCodeRecherche
Not available
Searches for a string or regular expression in the Code Editor control. New in version 2025CodeEditorDeleteAll(CODEEDT_Example)
sCode is string = [
sFile is string
info(sFile)
]
CodeEditorInsert(CODEEDT_Example, 1, sCode)
arrFind is array of int
CodeEditorSearch(CODEEDT_Example, "info")
IF arrFind.Count > 0 THEN
Info("'info' was found and will be replaced with 'error'.")
END
CodeEditorReplace(CODEEDT_Example, "info", "error")
CODEEDT_Example = [
HRead("file", 1)
HReadFirst("file", "item")
]
CodeEditorSearch(CODEEDT_Example, "HRead[a-zA-Z]*", byRegularExpression, CodeEditorSearch_Callback)
INTERNAL PROCEDURE CodeEditorSearch_Callback(Position int, Length int)
Trace(Position + " -> " + Length)
END
Syntax
Searching for text and getting its position Hide the details
<Result> = CodeEditorSearch(<Code Editor control> , <Text> [, <Options>])
<Result>: WLanguage array Array containing the positions of the search text. <Code Editor control>: Control name Name of the Code Editor control to be used. <Text>: Character string Text or regular expression to search for. <Options>: Optional Integer constant Search options:
| | byRegularExpression | Regular expression search. In this case, the <Text> parameter must be a regular expression. | IgnoreCase | Case and accent insensitive search (ignores uppercase and lowercase differences). | WholeWord | Whole word search (enclosed in punctuation characters or spaces). |
By default, search is case-sensitive.
Searching for text and running a procedure on each occurrence Hide the details
CodeEditorSearch(<Code Editor control> , <Text> , <Options> , <WLanguage procedure>)
<Code Editor control>: Control name Name of the Code Editor control to be used. <Text>: Character string Text or regular expression to search for. <Options>: Integer constant Search options:
| | byRegularExpression | Regular expression search. In this case, the <Text> parameter must be a regular expression. | IgnoreCase | Case and accent insensitive search (ignores uppercase and lowercase differences). | WholeWord | Whole word search (enclosed in punctuation characters or spaces). |
<WLanguage procedure>: Procedure name Name of the WLanguage procedure ("callback") called for each occurrence. For more details on this procedure, see Parameters of the procedure used by CodeEditorSearch. Business / UI classification: UI Code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|