File indexing completed on 2024-05-12 15:50:07
0001 /* 0002 SPDX-FileCopyrightText: 2016 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: MIT 0005 */ 0006 0007 #ifndef KSYNTAXHIGHLIGHTING_XML_P_H 0008 #define KSYNTAXHIGHLIGHTING_XML_P_H 0009 0010 #include <QString> 0011 0012 namespace KSyntaxHighlighting 0013 { 0014 /** Utilities for XML parsing. */ 0015 namespace Xml 0016 { 0017 /** Parse a xs:boolean attribute. */ 0018 inline bool attrToBool(QStringView str) 0019 { 0020 return str == QStringLiteral("1") || str.compare(QStringLiteral("true"), Qt::CaseInsensitive) == 0; 0021 } 0022 0023 } 0024 } 0025 0026 #endif