From b33a88d8bb8074ca681178b09f214194ae524fdc Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 18 Jul 2018 17:39:02 +0200 Subject: [PATCH] escape_rfc4180: document relation with std::quote * spot/misc/escape.hh: Here. --- spot/misc/escape.hh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spot/misc/escape.hh b/spot/misc/escape.hh index 4fb777a38..6f76d7bab 100644 --- a/spot/misc/escape.hh +++ b/spot/misc/escape.hh @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2011, 2012, 2013, 2015 Laboratoire de Recherche et +// Copyright (C) 2011-2013, 2015, 2018 Laboratoire de Recherche et // Developpement de l'Epita (LRDE). // Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre @@ -35,6 +35,15 @@ namespace spot /// /// In CSV files, as defined by RFC4180, double-quoted string that /// contain double-quotes should simply duplicate those quotes. + /// + /// Note that in C++14, + /// ``` + /// os << std::quoted(str, '"', '"'); + /// ``` + /// outputs the same result as + /// ``` + /// escape_rfc4180(os << '"', str) << '"'; + /// ``` SPOT_API std::ostream& escape_rfc4180(std::ostream& os, const std::string& str);