LLDB mainline
Stream.h
Go to the documentation of this file.
1//===-- Stream.h ------------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_UTILITY_STREAM_H
10#define LLDB_UTILITY_STREAM_H
11
12#include "lldb/Utility/Flags.h"
13#include "lldb/lldb-defines.h"
15#include "llvm/ADT/StringRef.h"
16#include "llvm/Support/FormatVariadic.h"
17#include "llvm/Support/raw_ostream.h"
18
19#include <cstdarg>
20#include <cstddef>
21#include <cstdint>
22#include <type_traits>
23
24namespace lldb_private {
25
26/// \class Stream Stream.h "lldb/Utility/Stream.h"
27/// A stream class that can stream formatted output to a file.
28class Stream {
29public:
30 /// \a m_flags bit values.
31 enum {
32 eBinary = (1 << 0) ///< Get and put data as binary instead of as the default
33 /// string mode.
34 };
35
36 /// Struct to store information for color highlighting in the stream.
38 llvm::StringRef pattern; ///< Regex pattern for highlighting.
39 llvm::StringRef prefix; ///< ANSI color code to start colorization.
40 llvm::StringRef suffix; ///< ANSI color code to end colorization.
41 bool ignore_case = false; ///< Whether to match case-insensitively.
42
43 HighlightSettings(llvm::StringRef p, llvm::StringRef pre,
44 llvm::StringRef suf, bool ic = false)
45 : pattern(p), prefix(pre), suffix(suf), ignore_case(ic) {}
46 };
47
48 /// Utility class for counting the bytes that were written to a stream in a
49 /// certain time span.
50 ///
51 /// \example
52 /// ByteDelta delta(*this);
53 /// WriteDataToStream("foo");
54 /// return *delta;
55 class ByteDelta {
57 /// Bytes we have written so far when ByteDelta was created.
58 size_t m_start;
59
60 public:
62 /// Returns the number of bytes written to the given Stream since this
63 /// ByteDelta object was created.
64 size_t operator*() const { return m_stream->GetWrittenBytes() - m_start; }
65 };
66
67 /// Construct with flags and address size and byte order.
68 ///
69 /// Construct with dump flags \a flags.
70 /// \a flags can be any of the above enumeration logical OR'ed together.
71 Stream(uint32_t flags, lldb::ByteOrder byte_order, bool colors = false);
72
73 /// Construct a default Stream, not binary, host byte order and host addr
74 /// size.
75 ///
76 Stream(bool colors = false);
77
78 // FIXME: Streams should not be copyable.
79 Stream(const Stream &other) : m_forwarder(*this) { (*this) = other; }
80
81 Stream &operator=(const Stream &rhs) {
82 m_flags = rhs.m_flags;
85 return *this;
86 }
87
88 /// Destructor
89 virtual ~Stream();
90
91 // Subclasses must override these methods
92
93 /// Flush the stream.
94 ///
95 /// Subclasses should flush the stream to make any output appear if the
96 /// stream has any buffering.
97 virtual void Flush() = 0;
98
99 /// Output character bytes to the stream.
100 ///
101 /// Appends \a src_len characters from the buffer \a src to the stream.
102 ///
103 /// \param[in] src
104 /// A buffer containing at least \a src_len bytes of data.
105 ///
106 /// \param[in] src_len
107 /// A number of bytes to append to the stream.
108 ///
109 /// \return
110 /// The number of bytes that were appended to the stream.
111 size_t Write(const void *src, size_t src_len) {
112 size_t appended_byte_count = WriteImpl(src, src_len);
113 m_bytes_written += appended_byte_count;
114 return appended_byte_count;
115 }
116
117 size_t GetWrittenBytes() const { return m_bytes_written; }
118
119 // Member functions
120 size_t PutChar(char ch);
121
122 /// Set the byte_order value.
123 ///
124 /// Sets the byte order of the data to extract. Extracted values will be
125 /// swapped if necessary when decoding.
126 ///
127 /// \param[in] byte_order
128 /// The byte order value to use when extracting data.
129 ///
130 /// \return
131 /// The old byte order value.
133
134 /// Format a C string from a printf style format and variable arguments and
135 /// encode and append the resulting C string as hex bytes.
136 ///
137 /// \param[in] format
138 /// A printf style format string.
139 ///
140 /// \param[in] ...
141 /// Any additional arguments needed for the printf format string.
142 ///
143 /// \return
144 /// The number of bytes that were appended to the stream.
145 size_t PrintfAsRawHex8(const char *format, ...)
146 __attribute__((__format__(__printf__, 2, 3)));
147
148 /// Append an uint8_t value in the hexadecimal format to the stream.
149 ///
150 /// \param[in] uvalue
151 /// The value to append.
152 ///
153 /// \return
154 /// The number of bytes that were appended to the stream.
155 size_t PutHex8(uint8_t uvalue);
156
157 size_t PutNHex8(size_t n, uint8_t uvalue);
158
159 size_t PutHex16(uint16_t uvalue,
160 lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
161
162 size_t PutHex32(uint32_t uvalue,
163 lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
164
165 size_t PutHex64(uint64_t uvalue,
166 lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
167
168 size_t PutMaxHex64(uint64_t uvalue, size_t byte_size,
169 lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
170 size_t PutFloat(float f,
171 lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
172
173 size_t PutDouble(double d,
174 lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
175
176 size_t PutLongDouble(long double ld,
177 lldb::ByteOrder byte_order = lldb::eByteOrderInvalid);
178
179 size_t PutPointer(void *ptr);
180
181 // Append \a src_len bytes from \a src to the stream as hex characters (two
182 // ascii characters per byte of input data)
183 size_t
184 PutBytesAsRawHex8(const void *src, size_t src_len,
185 lldb::ByteOrder src_byte_order = lldb::eByteOrderInvalid,
186 lldb::ByteOrder dst_byte_order = lldb::eByteOrderInvalid);
187
188 // Append \a src_len bytes from \a s to the stream as binary data.
189 size_t PutRawBytes(const void *s, size_t src_len,
190 lldb::ByteOrder src_byte_order = lldb::eByteOrderInvalid,
191 lldb::ByteOrder dst_byte_order = lldb::eByteOrderInvalid);
192
193 size_t PutStringAsRawHex8(llvm::StringRef s);
194
195 /// Output a NULL terminated C string \a cstr to the stream \a s.
196 ///
197 /// \param[in] cstr
198 /// A NULL terminated C string.
199 ///
200 /// \return
201 /// A reference to this class so multiple things can be streamed
202 /// in one statement.
203 Stream &operator<<(const char *cstr);
204
205 Stream &operator<<(llvm::StringRef str);
206
207 /// Output a pointer value \a p to the stream \a s.
208 ///
209 /// \param[in] p
210 /// A void pointer.
211 ///
212 /// \return
213 /// A reference to this class so multiple things can be streamed
214 /// in one statement.
215 Stream &operator<<(const void *p);
216
217 /// Output a character \a ch to the stream \a s.
218 ///
219 /// \param[in] ch
220 /// A printable character value.
221 ///
222 /// \return
223 /// A reference to this class so multiple things can be streamed
224 /// in one statement.
225 Stream &operator<<(char ch);
226
227 /// Output the result of a formatv expression to the stream.
228 ///
229 /// \param[in] obj
230 /// A formatv_object_base produced by llvm::formatv().
231 ///
232 /// \return
233 /// A reference to this class so multiple things can be streamed
234 /// in one statement.
235 Stream &operator<<(const llvm::formatv_object_base &obj);
236
237 Stream &operator<<(bool b) { return *this << (b ? "true" : "false"); }
238
239 Stream &operator<<(uint8_t uval) = delete;
240 Stream &operator<<(uint16_t uval) = delete;
241 Stream &operator<<(uint32_t uval) = delete;
242 Stream &operator<<(uint64_t uval) = delete;
243 Stream &operator<<(int8_t sval) = delete;
244 Stream &operator<<(int16_t sval) = delete;
245 Stream &operator<<(int32_t sval) = delete;
246 Stream &operator<<(int64_t sval) = delete;
247
248 /// Output a C string to the stream.
249 ///
250 /// Print a C string \a cstr to the stream.
251 ///
252 /// \param[in] cstr
253 /// The string to be output to the stream.
254 size_t PutCString(llvm::StringRef cstr);
255
256 /// Output a C string to the stream with color highlighting.
257 ///
258 /// Print a C string \a text to the stream, applying color highlighting to
259 /// the portions of the string that match the regex pattern \a pattern. The
260 /// pattern is matched as many times as possible throughout the string. If \a
261 /// pattern is nullptr, then no highlighting is applied.
262 ///
263 /// The highlighting is applied by enclosing the matching text in ANSI color
264 /// codes. The \a prefix parameter specifies the ANSI code to start the color
265 /// (the standard value is assumed to be 'ansi.fg.red', representing red
266 /// foreground), and the \a suffix parameter specifies the ANSI code to end
267 /// the color (the standard value is assumed to be 'ansi.normal', resetting to
268 /// default text style). These constants should be defined appropriately in
269 /// your environment.
270 ///
271 /// \param[in] text
272 /// The string to be output to the stream.
273 ///
274 /// \param[in] settings
275 /// Optional print hilight settings.
277 llvm::StringRef text,
278 std::optional<HighlightSettings> settings = std::nullopt);
279
280 /// Output and End of Line character to the stream.
281 size_t EOL();
282
283 /// The flags accessor.
284 ///
285 /// \return
286 /// A reference to the Flags member variable.
287 Flags &GetFlags();
288
289 /// The flags const accessor.
290 ///
291 /// \return
292 /// A const reference to the Flags member variable.
293 const Flags &GetFlags() const;
294
295 //// The byte order accessor.
296 ////
297 //// \return
298 //// The byte order.
300
301 /// Get the current indentation level.
302 ///
303 /// \return
304 /// The current indentation level.
305 unsigned GetIndentLevel() const;
306
307 /// Set the current indentation level.
308 ///
309 /// \param[in] level
310 /// The new indentation level.
311 void SetIndentLevel(unsigned level);
312
313 /// Indent the current line in the stream.
314 ///
315 /// Indent the current line using the current indentation level and print an
316 /// optional string following the indentation spaces.
317 ///
318 /// \param[in] s
319 /// A string to print following the indentation.
320 size_t Indent(llvm::StringRef s = "");
321
322 /// Decrement the current indentation level.
323 void IndentLess(unsigned amount = 2);
324
325 /// Increment the current indentation level.
326 void IndentMore(unsigned amount = 2);
327
328 struct IndentScope {
332
333 private:
336 };
337
338 /// Create an indentation scope that restores the original indent level when
339 /// the object goes out of scope (RAII).
340 IndentScope MakeIndentScope(unsigned indent_amount = 2);
341
342 /// Output an offset value.
343 ///
344 /// Put an offset \a uval out to the stream using the printf format in \a
345 /// format.
346 ///
347 /// \param[in] offset
348 /// The offset value.
349 ///
350 /// \param[in] format
351 /// The printf style format to use when outputting the offset.
352 void Offset(uint32_t offset, const char *format = "0x%8.8x: ");
353
354 /// Output printf formatted output to the stream.
355 ///
356 /// Print some formatted output to the stream.
357 ///
358 /// \param[in] format
359 /// A printf style format string.
360 ///
361 /// \param[in] ...
362 /// Variable arguments that are needed for the printf style
363 /// format string \a format.
364 size_t Printf(const char *format, ...) __attribute__((format(printf, 2, 3)));
365
366 size_t PrintfVarArg(const char *format, va_list args);
367
368 /// Forwards the arguments to llvm::formatv and writes to the stream.
369 /// FIXME: instead of this API, consider using llvm::formatv directly.
370 template <typename... Args> void Format(const char *format, Args &&... args) {
371 *this << llvm::formatv(format, std::forward<Args>(args)...);
372 }
373
374 /// Output a quoted C string value to the stream.
375 ///
376 /// Print a double quoted NULL terminated C string to the stream using the
377 /// printf format in \a format.
378 ///
379 /// \param[in] cstr
380 /// A NULL terminated C string value.
381 ///
382 /// \param[in] format
383 /// The optional C string format that can be overridden.
384 void QuotedCString(const char *cstr, const char *format = "\"%s\"");
385
386 /// Output a SLEB128 number to the stream.
387 ///
388 /// Put an SLEB128 \a uval out to the stream using the printf format in \a
389 /// format.
390 ///
391 /// \param[in] uval
392 /// A uint64_t value that was extracted as a SLEB128 value.
393 size_t PutSLEB128(int64_t uval);
394
395 /// Output a ULEB128 number to the stream.
396 ///
397 /// Put an ULEB128 \a uval out to the stream using the printf format in \a
398 /// format.
399 ///
400 /// \param[in] uval
401 /// A uint64_t value that was extracted as a ULEB128 value.
402 size_t PutULEB128(uint64_t uval);
403
404 /// Returns a raw_ostream that forwards the data to this Stream object.
405 llvm::raw_ostream &AsRawOstream() {
406 return m_forwarder;
407 }
408
409protected:
410 // Member variables
411 Flags m_flags; ///< Dump flags.
413 m_byte_order; ///< Byte order to use when encoding scalar types.
414 unsigned m_indent_level = 0; ///< Indention level.
415 std::size_t m_bytes_written = 0; ///< Number of bytes written so far.
416
417 void _PutHex8(uint8_t uvalue, bool add_prefix);
418
419 /// Output character bytes to the stream.
420 ///
421 /// Appends \a src_len characters from the buffer \a src to the stream.
422 ///
423 /// \param[in] src
424 /// A buffer containing at least \a src_len bytes of data.
425 ///
426 /// \param[in] src_len
427 /// A number of bytes to append to the stream.
428 ///
429 /// \return
430 /// The number of bytes that were appended to the stream.
431 virtual size_t WriteImpl(const void *src, size_t src_len) = 0;
432
433 /// \class RawOstreamForward Stream.h "lldb/Utility/Stream.h"
434 /// This is a wrapper class that exposes a raw_ostream interface that just
435 /// forwards to an LLDB stream, allowing to reuse LLVM algorithms that take
436 /// a raw_ostream within the LLDB code base.
437 class RawOstreamForward : public llvm::raw_ostream {
438 // Note: This stream must *not* maintain its own buffer, but instead
439 // directly write everything to the internal Stream class. Without this,
440 // we would run into the problem that the Stream written byte count would
441 // differ from the actually written bytes by the size of the internal
442 // raw_ostream buffer.
443
445 void write_impl(const char *Ptr, size_t Size) override {
446 m_target.Write(Ptr, Size);
447 }
448
449 uint64_t current_pos() const override {
450 return m_target.GetWrittenBytes();
451 }
452
453 public:
454 RawOstreamForward(Stream &target, bool colors = false)
455 : llvm::raw_ostream(/*unbuffered*/ true), m_target(target) {
456 enable_colors(colors);
457 }
458 };
460};
461
462/// Output an address value to this stream.
463///
464/// Put an address \a addr out to the stream with optional \a prefix and \a
465/// suffix strings.
466///
467/// \param[in] s
468/// The output stream.
469///
470/// \param[in] addr
471/// An address value.
472///
473/// \param[in] addr_size
474/// Size in bytes of the address, used for formatting.
475///
476/// \param[in] prefix
477/// A prefix C string. If nullptr, no prefix will be output.
478///
479/// \param[in] suffix
480/// A suffix C string. If nullptr, no suffix will be output.
481void DumpAddress(llvm::raw_ostream &s, uint64_t addr, uint32_t addr_size,
482 const char *prefix = nullptr, const char *suffix = nullptr);
483
484/// Output an address range to this stream.
485///
486/// Put an address range \a lo_addr - \a hi_addr out to the stream with
487/// optional \a prefix and \a suffix strings.
488///
489/// \param[in] s
490/// The output stream.
491///
492/// \param[in] lo_addr
493/// The start address of the address range.
494///
495/// \param[in] hi_addr
496/// The end address of the address range.
497///
498/// \param[in] addr_size
499/// Size in bytes of the address, used for formatting.
500///
501/// \param[in] prefix
502/// A prefix C string. If nullptr, no prefix will be output.
503///
504/// \param[in] suffix
505/// A suffix C string. If nullptr, no suffix will be output.
506void DumpAddressRange(llvm::raw_ostream &s, uint64_t lo_addr, uint64_t hi_addr,
507 uint32_t addr_size, const char *prefix = nullptr,
508 const char *suffix = nullptr);
509
510} // namespace lldb_private
511
512#endif // LLDB_UTILITY_STREAM_H
A command line argument class.
Definition Args.h:33
A class to manage flags.
Definition Flags.h:22
size_t operator*() const
Returns the number of bytes written to the given Stream since this ByteDelta object was created.
Definition Stream.h:64
size_t m_start
Bytes we have written so far when ByteDelta was created.
Definition Stream.h:58
This is a wrapper class that exposes a raw_ostream interface that just forwards to an LLDB stream,...
Definition Stream.h:437
uint64_t current_pos() const override
Definition Stream.h:449
RawOstreamForward(Stream &target, bool colors=false)
Definition Stream.h:454
void write_impl(const char *Ptr, size_t Size) override
Definition Stream.h:445
A stream class that can stream formatted output to a file.
Definition Stream.h:28
unsigned m_indent_level
Indention level.
Definition Stream.h:414
void Format(const char *format, Args &&... args)
Forwards the arguments to llvm::formatv and writes to the stream.
Definition Stream.h:370
size_t PrintfAsRawHex8(const char *format,...) __attribute__((__format__(__printf__
Format a C string from a printf style format and variable arguments and encode and append the resulti...
Definition Stream.cpp:229
Flags & GetFlags()
The flags accessor.
Definition Stream.cpp:220
lldb::ByteOrder GetByteOrder() const
Definition Stream.cpp:227
virtual size_t WriteImpl(const void *src, size_t src_len)=0
Output character bytes to the stream.
size_t PutNHex8(size_t n, uint8_t uvalue)
Definition Stream.cpp:245
size_t Write(const void *src, size_t src_len)
Output character bytes to the stream.
Definition Stream.h:111
void Offset(uint32_t offset, const char *format="0x%8.8x: ")
Output an offset value.
Definition Stream.cpp:44
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
Definition Stream.h:405
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
Definition Stream.cpp:157
Stream & operator<<(int64_t sval)=delete
size_t PutDouble(double d, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:350
Stream & operator<<(int16_t sval)=delete
size_t size_t PutHex8(uint8_t uvalue)
Append an uint8_t value in the hexadecimal format to the stream.
Definition Stream.cpp:269
size_t PutStringAsRawHex8(llvm::StringRef s)
Definition Stream.cpp:418
size_t PutHex64(uint64_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:307
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition Stream.cpp:134
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition Stream.cpp:63
RawOstreamForward m_forwarder
Definition Stream.h:459
virtual ~Stream()
Destructor.
size_t PutChar(char ch)
Definition Stream.cpp:131
Stream & operator<<(uint16_t uval)=delete
lldb::ByteOrder SetByteOrder(lldb::ByteOrder byte_order)
Set the byte_order value.
Definition Stream.cpp:37
@ eBinary
Get and put data as binary instead of as the default string mode.
Definition Stream.h:32
size_t PutHex16(uint16_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:275
Stream & operator=(const Stream &rhs)
Definition Stream.h:81
void QuotedCString(const char *cstr, const char *format="\"%s\"")
Output a quoted C string value to the stream.
Definition Stream.cpp:102
size_t size_t PrintfVarArg(const char *format, va_list args)
Definition Stream.cpp:143
size_t PutHex32(uint32_t uvalue, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:291
void SetIndentLevel(unsigned level)
Set the current indentation level.
Definition Stream.cpp:196
std::size_t m_bytes_written
Number of bytes written so far.
Definition Stream.h:415
void PutCStringColorHighlighted(llvm::StringRef text, std::optional< HighlightSettings > settings=std::nullopt)
Output a C string to the stream with color highlighting.
Definition Stream.cpp:73
IndentScope MakeIndentScope(unsigned indent_amount=2)
Create an indentation scope that restores the original indent level when the object goes out of scope...
Definition Stream.cpp:213
void _PutHex8(uint8_t uvalue, bool add_prefix)
Definition Stream.cpp:252
virtual void Flush()=0
Flush the stream.
size_t EOL()
Output and End of Line character to the stream.
Definition Stream.cpp:155
Stream & operator<<(int8_t sval)=delete
size_t GetWrittenBytes() const
Definition Stream.h:117
lldb::ByteOrder m_byte_order
Byte order to use when encoding scalar types.
Definition Stream.h:413
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
Definition Stream.cpp:204
Stream(uint32_t flags, lldb::ByteOrder byte_order, bool colors=false)
Construct with flags and address size and byte order.
Definition Stream.cpp:27
Stream(const Stream &other)
Definition Stream.h:79
size_t PutULEB128(uint64_t uval)
Output a ULEB128 number to the stream.
Definition Stream.cpp:55
Stream & operator<<(uint8_t uval)=delete
size_t PutBytesAsRawHex8(const void *src, size_t src_len, lldb::ByteOrder src_byte_order=lldb::eByteOrderInvalid, lldb::ByteOrder dst_byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:391
size_t PutLongDouble(long double ld, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:357
size_t PutSLEB128(int64_t uval)
Output a SLEB128 number to the stream.
Definition Stream.cpp:47
Flags m_flags
Dump flags.
Definition Stream.h:411
void IndentMore(unsigned amount=2)
Increment the current indentation level.
Definition Stream.cpp:201
Stream & operator<<(uint32_t uval)=delete
Stream & operator<<(int32_t sval)=delete
size_t PutPointer(void *ptr)
Definition Stream.cpp:338
size_t PutRawBytes(const void *s, size_t src_len, lldb::ByteOrder src_byte_order=lldb::eByteOrderInvalid, lldb::ByteOrder dst_byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:364
size_t PutFloat(float f, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:343
size_t PutMaxHex64(uint64_t uvalue, size_t byte_size, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
Definition Stream.cpp:323
unsigned GetIndentLevel() const
Get the current indentation level.
Definition Stream.cpp:193
Stream & operator<<(uint64_t uval)=delete
A class that represents a running process on the host machine.
void DumpAddressRange(llvm::raw_ostream &s, uint64_t lo_addr, uint64_t hi_addr, uint32_t addr_size, const char *prefix=nullptr, const char *suffix=nullptr)
Output an address range to this stream.
Definition Stream.cpp:120
void DumpAddress(llvm::raw_ostream &s, uint64_t addr, uint32_t addr_size, const char *prefix=nullptr, const char *suffix=nullptr)
Output an address value to this stream.
Definition Stream.cpp:108
ByteOrder
Byte ordering definitions.
llvm::StringRef pattern
Regex pattern for highlighting.
Definition Stream.h:38
HighlightSettings(llvm::StringRef p, llvm::StringRef pre, llvm::StringRef suf, bool ic=false)
Definition Stream.h:43
llvm::StringRef prefix
ANSI color code to start colorization.
Definition Stream.h:39
llvm::StringRef suffix
ANSI color code to end colorization.
Definition Stream.h:40
bool ignore_case
Whether to match case-insensitively.
Definition Stream.h:41