BSB Developer Docs
Loading...
Searching...
No Matches
get_line.h File Reference

read a line from stdin More...

#include <furi/core/string.h>

Go to the source code of this file.

Data Structures

struct  GetLineResult
 

Typedefs

typedef enum GetLineError GetLineError
 
typedef struct GetLineResult GetLineResult
 

Enumerations

enum  GetLineError { GetLineErrorNone , GetLineErrorTooLong , GetLineErrorInterrupt , GetLineErrorEOF }
 

Functions

GetLineResult get_line (size_t max_length)
 Read a line from stdin.
 

Detailed Description

read a line from stdin

Function Documentation

◆ get_line()

GetLineResult get_line ( size_t max_length)

Read a line from stdin.

Only lines up to max_length characters (including the newline) are read and returned. Longer lines are discarded.

Parameters
max_lengthmaximal length of the string (CR and LF characters are trimmed).
Returns
result of the operation. If error is GetLineErrorNone, line contains a valid string.