1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/// This flushes the buffered string.
/// Use this after you use `print!` macro.
/// This uses `std::io::stdout().flush` method.
/// This panics if `flush` method returns an error.
/// Same with `println!` macro with no argument.
/// This is made just for intuitive use.
/// ```
/// pub fn flushln() {
/// println!();
/// }
/// ```
/// While `print!` macro needs additional flushing,
/// this `printfl!` macro automatically flushes it.
/// This uses `std::io::stdin().read_line` method and return the string.
/// Unlike `read_line` method, this does not append to the given string,
/// and it is automatically trimmed.
/// ```
/// use cmasfo_dev::*;
///
/// println!("What is your favorite color?");
/// let s = get_line();
/// ```
/// Use `printfl!` macro then call `get_line` function.
/// This is useful if you want to get a string
/// after you print some message at the same line.
/// ```
/// use cmasfo_dev::*;
///
/// println!("What is your favorite color?");
/// let s = msg_line!("> ");
/// ```
/// Then the terminal will be shown like folling:
/// ```sh
/// What is your favorite color?
/// > orange
/// ```