Numworks Epsilon  1.4.1
Graphing Calculator Operating System
text_input_helpers.h
Go to the documentation of this file.
1 #ifndef ESCHER_TEXT_INPUT_HELPERS_H
2 #define ESCHER_TEXT_INPUT_HELPERS_H
3 
4 #include <escher/i18n.h>
5 
6 namespace TextInputHelpers {
7 
8 int CursorIndexInCommand(const char * text);
9 /* Returns the index of the cursor position in a Command, which is the smallest
10  * index between :
11  * - After the first open parenthesis/quote if the following element is
12  * either a quote, a coma or a parenthesi
13  * - The end of the text
14  * - Special case: when the text preceding the parenthesis is 'random', the
15  * cursor position is the end of the text. */
16 constexpr static const char * k_random = "random";
17 }
18 
19 #endif
int CursorIndexInCommand(const char *text)