LibGUI: Add number_of_words() to TextEditors

Returns the total number of words in a document.
This commit is contained in:
thankyouverycool 2021-09-18 16:31:47 -04:00 committed by Andreas Kling
commit 46043b71cb
Notes: sideshowbarker 2024-07-18 03:41:56 +09:00
2 changed files with 24 additions and 0 deletions

View file

@ -126,6 +126,7 @@ public:
bool write_to_file_and_close(int fd);
bool has_selection() const { return m_selection.is_valid(); }
String selected_text() const;
size_t number_of_words() const;
size_t number_of_selected_words() const;
void set_selection(TextRange const&);
void clear_selection();