DTEDITORCHANGE(3)
DtEditorChange π
okay so this is a library call β thatβs the manual name, bestie, DtEditorChange(library call) energy β and itβs literally all about changing strings inside a DtEditor widget. no cap, sheβs iconic β¨
β¨ NAME β¨
DtEditorChange β change one or all occurrences of a string in a DtEditor widget πΈ
πΈ SYNOPSIS πΈ
#include &<Dt/Editor.h>
Boolean DtEditorChange(
Widget widget,
DtEditorChangeValues *findChangeStrings,
unsigned int instanceToChange);
π DESCRIPTION π
DtEditorChange swaps out the next occurrence of a string, all occurrences of the string, or the currently selected text in a DtEditor widget with a replacement string. The string to search for and the value to change it to can be the last values entered in the Find/Change dialog (peep DtEditorInvokeFindChangeDialog(3)) or passed as arguments to DtEditorChange.
The search starts at the insertion cursor. If the string isnβt found by the time the end of the document is reached, the search continues at the beginning of the document, stopping at the character before the insertion cursor. Itβs giving wrap-around hunt, and honestly? Obsessed. π
widget is the DtEditor widget ID β thatβs your main character widget. findChangeStrings is the string to change plus the replacement value. If findChangeStrings is NULL, DtEditorChange uses the last string specified in the Find and Change To fields of the Find/Change dialog. And if instanceToChange is DtEDITOR_CURRENT_SELECTION, the Find field of DtEditorChangeValues is ignored. Yes, the manpage says that ignored-Find-field thing twice β itβs clearly a big deal π
instanceToChange is the switch that decides the vibe:
DtEDITOR_NEXT_OCCURRENCEβ replaces the next occurrence (relative to the insertion cursor) of the find string.DtEDITOR_ALL_OCCURRENCESβ changes all instances of the find string.DtEDITOR_CURRENT_SELECTIONβ the Find field ofDtEditorChangeValuesis ignored, and the currently selected text is replaced.
For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3). For a complete definition of DtEditorChangeValues, see Dt/Editor.h - DtEditor(5).
π RETURN VALUE π
Upon successful completion, DtEditorChange returns True if the substitution occurred; otherwise, it returns False. Binary slay β yes or no, no maybes β¨
π¦ SEE ALSO π¦
β source/version: DtEditorChange(library call); date: not listed in this footer, and honestly sheβs timeless. bye bestie π«Άπ
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms