mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 11:14:41 +00:00
Optionally exclude Unicode data
This commit is contained in:
parent
b37be85bf1
commit
3ada4aed20
@ -1844,8 +1844,9 @@ auto write_ptr(OutputIt out, UIntPtr value, const format_specs* specs)
|
||||
FMT_API auto is_printable(uint32_t cp) -> bool;
|
||||
|
||||
inline auto needs_escape(uint32_t cp) -> bool {
|
||||
return cp < 0x20 || cp == 0x7f || cp == '"' || cp == '\\' ||
|
||||
!is_printable(cp);
|
||||
if (cp < 0x20 || cp == 0x7f || cp == '"' || cp == '\\') return true;
|
||||
if (FMT_OPTIMIZE_SIZE > 1) return false;
|
||||
return !is_printable(cp);
|
||||
}
|
||||
|
||||
template <typename Char> struct find_escape_result {
|
||||
|
Loading…
Reference in New Issue
Block a user