201 { |
201 { |
202 print_to (handle, fmtstr, args...); |
202 print_to (handle, fmtstr, args...); |
203 fclose (handle); |
203 fclose (handle); |
204 } |
204 } |
205 } |
205 } |
206 |
|
207 // ------------------------------------------------------------------------------------------------- |
|
208 // |
|
209 // Prints the formatting result to the console |
|
210 // |
|
211 template<typename... argtypes> |
|
212 void print (const String& fmtstr, const argtypes&... args) |
|
213 { |
|
214 print_to_console (format (fmtstr, args...)); |
|
215 } |
|
216 |
|
217 // ------------------------------------------------------------------------------------------------- |
|
218 // |
|
219 // Prints the formatting result as a warning to the console |
|
220 // |
|
221 template<typename... argtypes> |
|
222 void print_warning (const String& fmtstr, const argtypes&... args) |
|
223 { |
|
224 print_to_console (TEXTCOLOR_BrightYellow "-!- " + format (fmtstr, args...) + TEXTCOLOR_Reset); |
|
225 } |
|
226 |
|
227 // ------------------------------------------------------------------------------------------------- |
|
228 // |
|
229 // Prints the formatting result as a warning to the console |
|
230 // |
|
231 template<typename... argtypes> |
|
232 void print_error (const String& fmtstr, const argtypes&... args) |
|
233 { |
|
234 print_to_console (TEXTCOLOR_BrightRed "!!! " + format (fmtstr, args...) + TEXTCOLOR_Reset); |
|
235 } |
|