Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

yscapec

Escape a file’s contents into a C string literal printed to stdout — handy for embedding JSON, SQL or HTML in .c source (e.g. a yuno’s fixed_config).

Usage

yscapec <FILE> > embedded.h
OptionPurpose
<FILE>Input file (positional, required)
--no-conversion / -nKeep " as \" instead of converting to '
--line-size / -sOutput line width (default 70)

Tabs become 4 spaces and control characters become \ooo octal escapes.

See also