mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
25 lines
756 B
C++
25 lines
756 B
C++
#ifndef SHARED_TOOLBOX_HELPERS_H
|
|
#define SHARED_TOOLBOX_HELPERS_H
|
|
|
|
#include <escher/i18n.h>
|
|
|
|
namespace Shared {
|
|
namespace ToolboxHelpers {
|
|
|
|
int CursorIndexInCommandText(const char * text);
|
|
/* Returns the index of the cursor position in a command, which is the smallest
|
|
* index between :
|
|
* - After the first open parenthesis
|
|
* - The end of the text */
|
|
|
|
|
|
void TextToInsertForCommandMessage(I18n::Message message, char * buffer, int bufferSize, bool replaceArgsWithEmptyChar = false);
|
|
void TextToInsertForCommandText(const char * command, int commandLength, char * buffer, int bufferSize, bool replaceArgsWithEmptyChar = false);
|
|
/* Removes the arguments from a command:
|
|
* - Removes text between parentheses or brackets, except commas */
|
|
|
|
}
|
|
}
|
|
|
|
#endif
|