1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 // Helper string methods
12 #ifndef INCLUDED_L10NTOOLS_INC_HELPER_HXX
13 #define INCLUDED_L10NTOOLS_INC_HELPER_HXX
15 #include <sal/config.h>
17 #include <string_view>
19 #include <libxml/xmlstring.h>
21 #include <rtl/string.hxx>
26 /// Escape all given character in the text
28 std::string_view rText
, std::string_view rUnEscaped
, std::string_view rEscaped
);
29 /// Unescape all given character in the text
31 std::string_view rText
, std::string_view rEscaped
, std::string_view rUnEscaped
);
33 /// Convert special characters to XML entity references
34 OString
QuotHTML( std::string_view rString
);
35 /// Convert XML entity references to single characters
36 OString
UnQuotHTML( std::string_view rString
);
38 /// Check whether text is a valid XML expression
39 bool isWellFormedXML( std::string_view text
);
41 /// Convert xmlChar* to OString
42 OString
xmlStrToOString( const xmlChar
* pString
);
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */