.. include:: ../substitutions
.. include:: ../../toolkit-substitutions

.. oe:namespace:: OESystem

.. meta::
   :keywords: OEStringCSVQuote

.. attention::

   |CPPONLY|

.. oe:function:: OEStringCSVQuote

   .. oe:api::

      std::string OEStringCSVQuote(const std::string& s, char delim = ', ',
                                   char quote = '"')

   Returns the string ``s`` optionally surrounded by quotes,
   ``quote``, only if the ``delim`` character occurs in the string or
   the first character of the string is the ``quote`` character. If
   quoted, instances of the ``quote`` character in the string will be
   escaped by inserting inserting another ``quote`` next to it. This
   is the quoting rules as defined by `RFC 4180
   <http://tools.ietf.org/html/rfc4180>`_ for the
   comma-separated-value, CSV, format. This is a low-level CSV
   function, most users can just use
   :oe:func:`OESystem::OEStringCSVJoin` and
   :oe:func:`OESystem::OEStringCSVTokenize`.
