rapidyaml  0.10.0
parse and emit YAML, and do it fast
scalar.cpp File Reference

Go to the source code of this file.

Namespaces

 c4
 
 c4::yml
 
 c4::yml::extra
 

Macros

#define _append(repl)
 
#define _c4flush_use_instead(i, repl, skip)
 

Functions

size_t c4::yml::extra::escape_scalar (substr buffer, csubstr val)
 

Macro Definition Documentation

◆ _append

#define _append (   repl)
Value:
do { \
if(repl.len && (pos + repl.len <= buffer.len)) \
memcpy(buffer.str + pos, repl.str, repl.len); \
pos += repl.len; \
} while(0)

◆ _c4flush_use_instead

#define _c4flush_use_instead (   i,
  repl,
  skip 
)
Value:
do { \
_append(val.range(prev, i)); \
_append(csubstr(repl)); \
prev = i + skip; \
} \
while(0)