dli.io

Implements QoL functions to handle user input-output.

Unless otherwise stated, all methods make use of stdin and stdout for input and output, respectively, or this thread's running ITextMenu, if any.

Members

Functions

request
bool request(string requestMsg, dataT* dataDestination, restrictionCheckerT restriction = (dataT foo))

Requests data with the possibility of adding restrictions. User input is stripped of the line terminator before processing is attempted.

requestConfirmation
bool requestConfirmation(string requestMsg, string requiredAnswer)

Requests a text confirmation from the user.

write
void write(string s)

Writes s to the output.

writeln
void writeln(string s)

Writes s, plus a line terminator, to the output.

Meta