From a5a25894c152848d1a57f97b2ef5542ddf6cdb9d Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Thu, 28 Mar 2024 16:26:42 -0700 Subject: Move `escapeString` to its own file Change-Id: Ie5c954ec73c46c9d3c679ef99a83a29cc7a08352 --- src/libexpr/print.hh | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/libexpr/print.hh') diff --git a/src/libexpr/print.hh b/src/libexpr/print.hh index 94cb11ca7..42826d94d 100644 --- a/src/libexpr/print.hh +++ b/src/libexpr/print.hh @@ -11,28 +11,13 @@ #include "fmt.hh" #include "print-options.hh" +#include "print-elided.hh" namespace nix { class EvalState; struct Value; -/** - * Print a string as a Nix string literal. - * - * Quotes and fairly minimal escaping are added. - * - * @param o The output stream to print to - * @param s The logical string - */ -std::ostream & printLiteralString(std::ostream & o, std::string_view s); -inline std::ostream & printLiteralString(std::ostream & o, const char * s) { - return printLiteralString(o, std::string_view(s)); -} -inline std::ostream & printLiteralString(std::ostream & o, const std::string & s) { - return printLiteralString(o, std::string_view(s)); -} - /** Print `true` or `false`. */ std::ostream & printLiteralBool(std::ostream & o, bool b); -- cgit v1.2.3