Doxygen
Loading...
Searching...
No Matches
QCString Class Reference

This is an alternative implementation of QCString. More...

#include <src/qcstring.h>

Public Types

enum  SizeTag { ExplicitSize }
 creates a string with room for size characters More...
 

Public Member Functions

 QCString ()=default
 
 QCString (const std::string &s)
 
 QCString (std::string &&s)
 
 QCString (std::string_view sv)
 
QCStringoperator= (std::string_view sv)
 
 QCString (int)=delete
 
 QCString (const JavaCCString &s)
 For converting a JavaCC string.
 
QCStringoperator= (const JavaCCString &s)
 
 QCString (size_t size, SizeTag t)
 
 QCString (const char *str)
 creates a string from a plain C string.
 
 QCString (const char *str, size_t maxlen)
 creates a string from str and copies over the first maxlen characters.
 
QCStringoperator= (const char *str)
 replaces the contents by that of C string str.
 
QCStringoperator= (const std::string &s)
 
bool isEmpty () const
 Returns TRUE iff the string is empty.
 
size_t length () const
 Returns the length of the string, not counting the 0-terminator.
 
size_t size () const
 Returns the length of the string, not counting the 0-terminator.
 
const char * data () const
 Returns a pointer to the contents of the string in the form of a 0-terminated C string.
 
std::string_view view () const
 
char * rawData ()
 Returns a writable pointer to the data.
 
void resize (size_t newlen)
 
void clear ()
 
void reserve (size_t size)
 Reserve space for size bytes without changing the string contents.
 
void fill (char c, int len=-1)
 Fills a string with a predefined character.
 
QCStringsprintf (const char *format,...)
 
int find (char c, int index=0, bool cs=TRUE) const
 
int find (const char *str, int index=0, bool cs=TRUE) const
 
int find (const QCString &str, int index=0, bool cs=TRUE) const
 
int findRev (char c, int index=-1, bool cs=TRUE) const
 
int findRev (const char *str, int index=-1, bool cs=TRUE) const
 
int contains (char c, bool cs=TRUE) const
 
int contains (const char *str, bool cs=TRUE) const
 
bool stripPrefix (const QCString &prefix)
 
bool stripPrefix (const char *prefix)
 
QCString left (size_t len) const
 
QCString right (size_t len) const
 
QCString mid (size_t index, size_t len=static_cast< size_t >(-1)) const
 
QCString lower () const
 
QCString upper () const
 
QCString stripWhiteSpace () const
 returns a copy of this string with leading and trailing whitespace removed
 
QCString stripLeadingAndTrailingEmptyLines () const
 
QCString quoted () const
 
QCString removeWhiteSpace () const
 returns a copy of this string with all whitespace removed
 
QCString simplifyWhiteSpace () const
 return a copy of this string with leading and trailing whitespace removed and multiple whitespace characters replaced by a single space
 
QCString repeat (unsigned int n) const
 
QCStringinsert (size_t index, const QCString &s)
 
QCStringinsert (size_t index, std::string_view s)
 
QCStringinsert (size_t index, const char *s)
 
QCStringinsert (size_t index, char c)
 
QCStringappend (char c)
 
QCStringappend (const char *s)
 
QCStringappend (const QCString &s)
 
QCStringappend (const std::string &s)
 
QCStringappend (std::string_view s)
 
QCStringprepend (const char *s)
 
QCStringprepend (const QCString &s)
 
QCStringprepend (const std::string &s)
 
QCStringprepend (std::string_view s)
 
QCStringremove (size_t index, size_t len)
 
QCStringreplace (size_t index, size_t len, const char *s)
 
short toShort (bool *ok=nullptr, int base=10) const
 
uint16_t toUShort (bool *ok=nullptr, int base=10) const
 
int toInt (bool *ok=nullptr, int base=10) const
 
uint32_t toUInt (bool *ok=nullptr, int base=10) const
 
long toLong (bool *ok=nullptr, int base=10) const
 
unsigned long toULong (bool *ok=nullptr, int base=10) const
 
uint64_t toUInt64 (bool *ok=nullptr, int base=10) const
 
QCStringsetNum (short n)
 
QCStringsetNum (uint16_t n)
 
QCStringsetNum (int n)
 
QCStringsetNum (uint32_t n)
 
QCStringsetNum (long n)
 
QCStringsetNum (long long n)
 
QCStringsetNum (unsigned long long n)
 
QCStringsetNum (unsigned long n)
 
bool startsWith (const char *s) const
 
bool startsWith (const QCString &s) const
 
bool endsWith (const char *s) const
 
bool endsWith (const QCString &s) const
 
const std::string & str () const
 
QCStringoperator+= (const QCString &s)
 
QCStringoperator+= (const std::string &s)
 
QCStringoperator+= (std::string_view s)
 
QCStringoperator+= (const char *s)
 Appends string str to this string and returns a reference to the result.
 
char & at (size_t i)
 Returns a reference to the character at index i.
 
const char & at (size_t i) const
 
char & operator[] (size_t i)
 Indexing operator.
 
const char & operator[] (size_t i) const
 

Private Attributes

std::string m_rep
 

Detailed Description

This is an alternative implementation of QCString.

It provides basically the same functions but uses std::string as the underlying string type

Definition at line 100 of file qcstring.h.

Member Enumeration Documentation

◆ SizeTag

creates a string with room for size characters

Parameters
[in]sizethe number of character to allocate (also counting the 0-terminator!)
Enumerator
ExplicitSize 

Definition at line 133 of file qcstring.h.

133{ ExplicitSize };
@ ExplicitSize
Definition qcstring.h:133

Constructor & Destructor Documentation

◆ QCString() [1/9]

◆ QCString() [2/9]

QCString::QCString ( const std::string & s)
inlineexplicit

Definition at line 104 of file qcstring.h.

104: m_rep(s) {}
std::string m_rep
Definition qcstring.h:589

References m_rep.

◆ QCString() [3/9]

QCString::QCString ( std::string && s)
inline

Definition at line 106 of file qcstring.h.

106: m_rep(std::move(s)) {}

References m_rep.

◆ QCString() [4/9]

QCString::QCString ( std::string_view sv)
inline

Definition at line 108 of file qcstring.h.

108: m_rep(sv) {}

References m_rep.

◆ QCString() [5/9]

QCString::QCString ( int )
delete

◆ QCString() [6/9]

QCString::QCString ( const JavaCCString & s)
inline

For converting a JavaCC string.

Definition at line 118 of file qcstring.h.

119 {
120 m_rep.resize(s.size());
121 memcpy(m_rep.data(),s.data(),s.size());
122 }

References m_rep.

◆ QCString() [7/9]

QCString::QCString ( size_t size,
SizeTag t )
inlineexplicit

Definition at line 134 of file qcstring.h.

134{ m_rep.resize(size); }
size_t size() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:156

References m_rep, and size().

◆ QCString() [8/9]

QCString::QCString ( const char * str)
inline

creates a string from a plain C string.

Parameters
[in]strA zero terminated C string. When 0 an empty string is created.

Definition at line 139 of file qcstring.h.

139: m_rep(str?str:"") {}
const std::string & str() const
Definition qcstring.h:526

References m_rep, and str().

◆ QCString() [9/9]

QCString::QCString ( const char * str,
size_t maxlen )
inline

creates a string from str and copies over the first maxlen characters.

Definition at line 142 of file qcstring.h.

142: m_rep(str?str:"") { m_rep.resize(maxlen); }

References m_rep, and str().

Member Function Documentation

◆ append() [1/5]

◆ append() [2/5]

QCString & QCString::append ( const char * s)
inline

Definition at line 387 of file qcstring.h.

388 {
389 return operator+=(s);
390 }
QCString & operator+=(const QCString &s)
Definition qcstring.h:531

References operator+=(), and QCString().

◆ append() [3/5]

QCString & QCString::append ( const QCString & s)
inline

Definition at line 392 of file qcstring.h.

393 {
394 return operator+=(s);
395 }

References operator+=(), and QCString().

◆ append() [4/5]

QCString & QCString::append ( const std::string & s)
inline

Definition at line 397 of file qcstring.h.

398 {
399 return operator+=(s);
400 }

References operator+=(), and QCString().

◆ append() [5/5]

QCString & QCString::append ( std::string_view s)
inline

Definition at line 402 of file qcstring.h.

403 {
404 return operator+=(s);
405 }

References operator+=(), and QCString().

◆ at() [1/2]

char & QCString::at ( size_t i)
inline

Returns a reference to the character at index i.

Definition at line 567 of file qcstring.h.

568 {
569 return m_rep[i];
570 }

References m_rep.

Referenced by DefinitionImpl::_setBriefDescription(), abbreviate(), Qhp::addContentsItem(), addIncludeFile(), addSeparatorsIfNeeded(), addTemplateNames(), addVariableToFile(), Config::checkAndCorrect(), checkVhdlString(), computeVerifiedDotPath(), configStringRecode(), TranslatorPersian::convertDigitsToFarsi(), MemberDefImpl::displayDefinition(), DocEmoji::DocEmoji(), elemIsVisible(), expandExpression(), externalRef(), DefinitionImpl::externalReference(), extractPartAfterNewLine(), findDirDocumentation(), findEndOfTemplate(), findEnumDocumentation(), VhdlDocGen::formatString(), PerlModGenerator::generatePerlModForMember(), generateSqlite3ForMember(), generateXMLForMember(), getCanonicalTemplateSpec(), getCurrentChar(), getExtension(), getLanguageFromCodeLang(), getLanguageFromFileName(), getNextChar(), getNextId(), getScopeDefs(), getScopeFragment(), handleHtmlTag(), DocPara::handleStartCode(), Markdown::Private::isAtxHeader(), NamespaceDefImpl::isLinkableInProject(), isVarWithConstructor(), leftScopeMatch(), linkToText(), makeFileName(), makeFileName(), matchExcludedSymbols(), nameIsOperator(), SymbolResolver::Private::newResolveTypedef(), node2URL(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), ManDocVisitor::operator()(), parseCommentAsText(), parseFuncDecl(), Markdown::process(), Markdown::Private::processLink(), processList(), processString(), projectLogoSize(), readCodeFragment(), readIncludeFile(), readIncludeFile(), HtmlHelpRecoder::recode(), recognizeFixedForm(), replaceFunctionMacro(), resolveSymlink(), rightScopeMatch(), searchInputFiles(), splitSearchTokens(), startsWithKeyword(), stringize(), stripAnonymousNamespaceScope(), stripComment(), stripIrrelevantString(), stripQuotes(), stripQuotes(), stripScope(), stripTemplateSpecifiers(), stripTemplateSpecifiersFromScope(), stripTrailingWhiteSpace(), substEnvVarsInStrList(), Portable::system(), transcodeCharacterStringToUTF8(), Trace::trunc(), updateLanguageMapping(), validatingParseDoc(), MemberDefImpl::writeDeclaration(), MemberDefImpl::writeDocumentation(), writeExceptionList(), VhdlDocGen::writeFormatString(), writeIndexHierarchyEntries(), MemberDefImpl::writeMemberDocSimple(), writeMemberList(), writeObjCMethodCall(), PlantumlManager::writePlantUMLSource(), writeSingleFileIndex(), ConfigOption::writeStringList(), writeWord(), and HtmlEntityMapper::writeXMLSchema().

◆ at() [2/2]

const char & QCString::at ( size_t i) const
inline

Definition at line 572 of file qcstring.h.

573 {
574 return m_rep[i];
575 }

References m_rep.

◆ clear()

◆ contains() [1/2]

int QCString::contains ( char c,
bool cs = TRUE ) const

Definition at line 143 of file qcstring.cpp.

144{
145 if (length()==0) return 0;
146 int count=0;
147 const char *pos = data();
148 if (cs)
149 {
150 while (*pos) if (*pos++ == c) count++;
151 }
152 else
153 {
154 c = toLowerChar(c);
155 while (*pos)
156 {
157 if (toLowerChar(*pos)==c) count++;
158 pos++;
159 }
160 }
161 return count;
162}
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:159
char toLowerChar(char c)
Definition qcstring.cpp:24

References data(), length(), and toLowerChar().

Referenced by addMacroDefinition(), applyModifiers(), buildScopeFromQualifiedName(), VHDLOutlineParser::checkInlineCode(), DotNode::convertLabel(), SymbolModifiers::operator|=(), VhdlDocGen::parseForConfig(), readIncludeFile(), and writeUCFLink().

◆ contains() [2/2]

int QCString::contains ( const char * str,
bool cs = TRUE ) const

Definition at line 164 of file qcstring.cpp.

165{
166 if (str==nullptr || length()==0) return 0;
167 int count=0;
168 const char *pos = data();
169 int len = qstrlen(str);
170 while (*pos)
171 {
172 if (cs)
173 {
174 if (qstrncmp(pos,str,len)==0) count++;
175 }
176 else
177 {
178 if (qstrnicmp(pos,str,len)==0) count++;
179 }
180 pos++;
181 }
182 return count;
183}
int qstrncmp(const char *str1, const char *str2, size_t len)
Definition qcstring.h:75
int qstrnicmp(const char *str1, const char *str2, size_t len)
Definition qcstring.cpp:458
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Definition qcstring.h:58

References data(), length(), qstrlen(), qstrncmp(), qstrnicmp(), and str().

◆ data()

const char * QCString::data ( ) const
inline

Returns a pointer to the contents of the string in the form of a 0-terminated C string.

Definition at line 159 of file qcstring.h.

159{ return m_rep.c_str(); }

References m_rep.

Referenced by DefinitionImpl::_docsAlreadyAdded(), SectionManager::add(), Crawlmap::addContentsItem(), addMacroDefinition(), GrowBuf::addStr(), addXRefItem(), adjustConfiguration(), bindTextParameter(), buildFileName(), checkBlocks(), checkMarkdownMainfile(), FlowChart::codify(), HtmlCodeGenerator::codify(), LatexCodeGenerator::codify(), ManCodeGenerator::codify(), RTFCodeGenerator::codify(), codifyLines(), codifyLines(), codifyLines(), codifyLines(), codifyLines(), codifyMapLines(), FilterCache::compileLineOffsets(), computeQualifiedIndex(), configStringRecode(), contains(), contains(), convertCharEntitiesToUTF8(), convertCppComments(), convertNameToFile(), convertToComment(), convertToDocBook(), convertToHtml(), convertToId(), convertToJSString(), convertToPSString(), convertToXML(), ResourceMgr::copyResourceAs(), Portable::correctPath(), VhdlDocGen::createFlowChart(), detab(), do_mscgen_generate(), ManGenerator::docify(), HtmlGenerator::docify_(), docifyToString(), docifyToString(), encodeDirName(), encodeForOutput(), escapeAt(), escapeCharsInString(), escapeDoubleQuotes(), escapeSpecialChars(), escapeTooltip(), extractBoundingBox(), HtmlDocVisitor::filter(), ManDocVisitor::filter(), RTFDocVisitor::filter(), TextDocVisitor::filter(), filter2008VhdlComment(), filterId(), filterLatexString(), HtmlDocVisitor::filterQuotedCdataAttr(), find(), find(), Markdown::Private::findEmphasisChar(), Markdown::Private::findEndOfLine(), findRev(), findRev(), DocTokenizer::findSections(), VhdlDocGen::findVhdlClass(), Portable::fopen(), format_warn(), formatDateTime(), generateAnonymousAnchor(), generateOutput(), generateXML(), getConvertLatexMacro(), Portable::getenv(), CitationManager::getFormulas(), ParserManager::getParsers(), getPrefixIndex(), getProjectId(), SymbolResolver::Private::getResolvedTypeRec(), handle_warn_as_error(), handleCommentBlock(), handleToc(), PerlModOutput::iaddQuoted(), LayoutDocManager::init(), HtmlHelpRecoder::initialize(), Qhp::initialize(), insert(), insertPath(), DocParser::internalValidatingParseDoc(), Portable::isAbsolutePath(), isLowerCase(), latexEscapeIndexChars(), latexEscapeLabelName(), latexEscapePDFString(), latexFilterURL(), letterToLabel(), VHDLOutlineParser::lineCount(), loadStylesheet(), nameIsActuallyPartOfType(), operator!=(), operator!=(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), RTFDocVisitor::operator()(), operator<(), operator<(), operator<(), operator<=(), operator<=(), operator==(), operator==(), operator>(), operator>(), operator>=(), operator>=(), DocIncOperator::parse(), LayoutDocManager::parse(), CCodeParser::parseCode(), FileCodeParser::parseCode(), FortranCodeParser::parseCode(), LexCodeParser::parseCode(), PythonCodeParser::parseCode(), SQLCodeParser::parseCode(), VHDLCodeParser::parseCode(), XMLCodeParser::parseCode(), parseCommentAsText(), parseFile(), parseFuncDecl(), parsePrototype(), parsePrototype(), ConfigImpl::parseString(), parseTagFile(), VHDLOutlineParser::Private::parseVhdlfile(), Portable::popen(), prepend(), preProcessFile(), RTFGenerator::preProcessFileInplace(), Markdown::process(), Markdown::Private::processBlocks(), Markdown::Private::processQuotations(), Markdown::Private::processSpecialCommand(), pushBuffer(), qPrint(), qstrcmp(), qstrcmp(), qstrcmp(), qstricmp(), qstricmp(), qstricmp(), qstricmp_sort(), qstricmp_sort(), qstricmp_sort(), qstrnicmp(), qstrnicmp(), qstrnicmp(), readCodeFragment(), readConfiguration(), readIncludeFile(), HtmlHelpRecoder::recode(), Portable::recodeUtf8StringToW(), recognizeFixedForm(), removeEmptyLines(), removeIdsAndMarkers(), removeMarkers(), removeRedundantWhiteSpace(), repeat(), SectionManager::replace(), replaceAnonymousScopes(), CitationManager::replaceFormulas(), replaceVariables(), DotFilePatcher::run(), runPlantumlContent(), ColoredImage::save(), Image::save(), selectBlocks(), MemberDefImpl::setAnchor(), Portable::setenv(), simplifyWhiteSpace(), skipToEndMarker(), startCondSection(), Image::stringLength, stringToArgumentList(), stripIndentation(), stripIndentationVerbatim(), stripLeadingAndTrailingEmptyLines(), stripTrailingWhiteSpace(), substitute(), substitute(), substituteKeywords(), Portable::system(), toLong(), toUInt64(), toULong(), transcodeCharacterBuffer(), unescapeCharsInString(), unescapeCRef(), Portable::unlink(), DocTokenizer::unputString(), Portable::unsetenv(), updateLanguageMapping(), validatingParseDoc(), validatingParseText(), ManCodeGenerator::writeCodeLink(), writeDEFString(), writeDocbookCodeString(), ClassDefImpl::writeIncludeFilesForSlice(), writeMemberList(), writeMultiLineCodeLink(), writeMultiLineCodeLink(), writeMultiLineCodeLink(), writeMultiLineCodeLink(), HtmlDocVisitor::writeObfuscatedMailAddress(), writeObjCMethodCall(), DocbookGenerator::writePageLink(), PlantumlManager::writePlantUMLSource(), Image::writeString(), ConfigOption::writeStringValue(), and writeXMLCodeString().

◆ endsWith() [1/2]

◆ endsWith() [2/2]

bool QCString::endsWith ( const QCString & s) const
inline

Definition at line 511 of file qcstring.h.

512 {
513 size_t l = s.length();
514 return m_rep.length()>=l && m_rep.compare(m_rep.length()-l, l, s.str())==0;
515 }

References length(), m_rep, QCString(), and str().

◆ fill()

void QCString::fill ( char c,
int len = -1 )
inline

Fills a string with a predefined character.

Parameters
[in]cthe character used to fill the string with.
[in]lenthe number of character to fill. Use -1 to fill the whole string.
Note
the string will be resized to contain len characters. The contents of the string will be lost.

Definition at line 180 of file qcstring.h.

181 {
182 int l = len==-1 ? static_cast<int>(m_rep.size()) : len;
183 m_rep = std::string(l,c);
184 }

References m_rep.

Referenced by FlowChart::alignCommentNode(), FlowChart::alignFuncProc(), checkIfHtmlEndTagEndsAutoList(), codifyMapLines(), generateJSTree(), DocSets::Private::indent(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), printNavLayout(), printNavTree(), FlowChart::printNode(), readCodeFragment(), and writeTemplateArgumentList().

◆ find() [1/3]

int QCString::find ( char c,
int index = 0,
bool cs = TRUE ) const

Definition at line 43 of file qcstring.cpp.

44{
45 if (index<0 || index>=static_cast<int>(length())) return -1; // index outside string
46 const char *pos = nullptr;
47 if (cs)
48 {
49 pos = strchr(data()+index,c);
50 }
51 else
52 {
53 pos = data()+index;
54 c = toLowerChar(c);
55 while (*pos && toLowerChar(*pos)!=c) pos++;
56 if (!*pos && c) pos=nullptr; // not found
57 }
58 return pos ? static_cast<int>(pos - data()) : -1;
59}

References data(), length(), and toLowerChar().

Referenced by MemberDefImpl::_computeIsConstructor(), MemberDefImpl::_computeIsDestructor(), DefinitionImpl::_docsAlreadyAdded(), MemberDefImpl::_writeCategoryRelation(), MemberDefImpl::_writeReimplements(), VhdlDocGen::addBaseClass(), addClassToContext(), VHDLOutlineParser::addCompInst(), addConceptToContext(), ModuleManager::addDocs(), addHtmlExtensionIfMissing(), addMacroDefinition(), addSubprogram(), addTemplateNames(), ClassDefImpl::addTypeConstraints(), addVariableToFile(), adjustConfiguration(), argListToString(), buildScopeFromQualifiedName(), Config::checkAndCorrect(), VHDLOutlineParser::checkInlineCode(), checkList(), combineArgsAndException(), computeClassRelations(), VhdlDocGen::convertFileNameToClassName(), DotFilePatcher::convertMapFile(), MemberList::countEnumValues(), createDVIFile(), determineBlockName(), MemberDefImpl::displayDefinition(), DocInternalRef::DocInternalRef(), ExistsOnPath(), extractBeginRawStringDelimiter(), extractBlock(), extractBoundingBox(), extractClassName(), extractFromParens(), extractLanguageSpecificTitle(), extractNoExcept(), extractPartAfterNewLine(), fillColorStyleMap(), filterMemberDocumentation(), find(), VhdlDocGen::findAllArchitectures(), DocParser::findDocsForMemberOrCompound(), findGlobalMember(), findMember(), VhdlDocGen::findMemberDef(), findPackageScopeFromPath(), findUsedClassesForClass(), findUsingDeclImports(), generateClassOrGlobalLink(), generateDEFForClass(), generateFileSources(), generateFunctionLink(), CitationManager::generatePage(), generateXML(), generateXMLForMember(), getDefsOld(), getDotImageExtension(), getFilteredImageAttributes(), getFilterFromList(), getLinkInScope(), ParserManager::getParsers(), SymbolResolver::Private::getResolvedSymbolRec(), getTemplateArgumentsFromName(), DocPara::handleCommand(), DocParser::handleParameterType(), handleToc(), CitationManager::insertCrossReferencesForBibFile(), insertTemplateSpecifierInScope(), isCastKeyword(), MemberDefImpl::isDocumentedFriendClass(), ClassDefImpl::isExtension(), isRecursiveBaseClass(), DocImage::isSVG(), isURL(), isVarWithConstructor(), lineBlock(), linkToText(), Htags::loadFilemap(), makeBaseName(), makeBaseName(), makeBaseName(), makeQualifiedNameWithTemplateParameters(), makeTemplateInstanceRelation(), matchCanonicalTypes(), matchExcludedSymbols(), mergeArguments(), mergeCategories(), DirDefImpl::mergeDirectoryInTree(), nameIsOperator(), SymbolResolver::Private::newResolveTypedef(), normalizeNonTemplateArgumentsInString(), VHDLOutlineParser::oneLineComment(), SymbolModifiers::operator|=(), DocLink::parse(), DocParamList::parse(), parseFuncDecl(), VhdlDocGen::parseFuncProto(), parseMain(), VhdlDocGen::parseUCF(), Markdown::Private::processLink(), processTagLessClasses(), projectLogoFile(), projectLogoSize(), readTagFile(), CitationManager::replaceFormulas(), replaceRef(), replaceVariables(), resolveRef(), resolveSymlink(), resolveTypeDef(), DotFilePatcher::run(), searchTemplateSpecs(), MemberList::setAnonymousEnumType(), setClassScope(), SearchIndexExternal::setCurrentDoc(), setJavaProtection(), splitSearchTokens(), splitString(), LatexDocVisitor::startPlantUmlFile(), stripDeclKeywords(), stripIrrelevantString(), stripTemplateSpecifiersFromScope(), subrHandleCommentBlock(), substEnvVarsInStrList(), Portable::system(), trimBaseClassScope(), Portable::unsetenv(), MemberDefImpl::warnIfUndocumented(), MemberDefImpl::warnIfUndocumentedParams(), DotNode::writeDEF(), writeDefArgumentList(), FileDefImpl::writeDetailedDescription(), DotNode::writeDocbook(), MemberDefImpl::writeDocumentation(), writeExceptionList(), writeExceptionListImpl(), HtmlGenerator::writeExternalSearchPage(), writeFileIndex(), VhdlDocGen::writeFormatString(), writeGraphInfo(), LatexDocVisitor::writePlantUMLFile(), VhdlDocGen::writeRecordUnit(), VhdlDocGen::writeSource(), DefinitionImpl::writeSourceDef(), and DotNode::writeXML().

◆ find() [2/3]

int QCString::find ( const char * str,
int index = 0,
bool cs = TRUE ) const

Definition at line 61 of file qcstring.cpp.

62{
63 int l = static_cast<int>(length());
64 if (index<0 || index>=l) return -1; // index outside string
65 if (!str) return -1; // no string to search for
66 if (!*str) return index; // empty string matching at index
67 const char *pos = nullptr;
68 if (cs) // case sensitive
69 {
70 pos = strstr(data()+index,str);
71 }
72 else // case insensitive
73 {
74 pos = data();
75 int len = qstrlen(str);
76 while (*pos)
77 {
78 if (qstrnicmp(pos,str,len)==0) break;
79 pos++;
80 }
81 if (!*pos) pos = nullptr; // not found
82 }
83 return pos ? static_cast<int>(pos - data()) : -1;
84}

References data(), length(), qstrlen(), qstrnicmp(), and str().

◆ find() [3/3]

int QCString::find ( const QCString & str,
int index = 0,
bool cs = TRUE ) const

Definition at line 86 of file qcstring.cpp.

87{
88 return find(str.data(),index,cs);
89}
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43

References find(), QCString(), and str().

◆ findRev() [1/2]

int QCString::findRev ( char c,
int index = -1,
bool cs = TRUE ) const

Definition at line 91 of file qcstring.cpp.

92{
93 const char *b = data();
94 const char *pos = nullptr;
95 int len = static_cast<int>(length());
96 if (len==0) return -1; // empty string
97 if (index<0) // start from end
98 {
99 if (cs)
100 {
101 pos = strrchr(b,c);
102 return pos ? static_cast<int>(pos - b) : -1;
103 }
104 index=len;
105 }
106 else if (index>len) // bad index
107 {
108 return -1;
109 }
110 pos = b+index;
111 if (cs)
112 {
113 while ( pos>=b && *pos!=c) pos--;
114 }
115 else
116 {
117 c = toLowerChar(c);
118 while ( pos>=b && toLowerChar(*pos)!=c) pos--;
119 }
120 return pos>=b ? static_cast<int>(pos - b) : -1;
121}

References data(), length(), and toLowerChar().

Referenced by abbreviate(), addClassToContext(), addEnumValuesToEnums(), addHtmlExtensionIfMissing(), addMemberFunction(), addModule(), addTemplateNames(), TooltipManager::addTooltip(), alignText(), buildDirectories(), buildFileList(), combineArgsAndException(), computeCommonDirPrefix(), convertFileId2Var(), VhdlDocGen::correctMemberProperties(), MemberList::countEnumValues(), VhdlDocGen::deleteAllChars(), VhdlDocGen::deleteCharRev(), MemberDefImpl::displayDefinition(), endScope(), extractFromParens(), extractNamespaceName(), fillColorStyleMap(), DocParser::findAndCopyImage(), findClassRelation(), findDirDocumentation(), findEnumDocumentation(), findEnums(), findFileDef(), findGlobalMember(), findPackageScopeFromPath(), findParameterList(), findUsingDeclImports(), findUsingDirectives(), generateClassOrGlobalLink(), generateFunctionLink(), generateFunctionLink(), generateMemberLink(), PlantumlManager::generatePlantUMLOutput(), generateXMLForMember(), getBaseNameOfOutput(), getDefsOld(), getFileNameExtension(), getParserForFile(), getScopeDefs(), guessSection(), FileDefImpl::isDocumentationFile(), NamespaceDefImpl::isLinkableInProject(), Htags::loadFilemap(), makeBaseName(), makeShortName(), makeShortName(), makeShortName(), markdownFileNameToId(), mergeScopes(), SymbolResolver::Private::newResolveTypedef(), PerlModDocVisitor::operator()(), parseFile(), VhdlDocGen::parseForBinding(), VhdlDocGen::parseForConfig(), parseFuncDecl(), VhdlDocGen::parseFuncProto(), VHDLOutlineParser::popLabel(), readCodeFragment(), relativePathToRoot(), resolveModuleProcedures(), resolveRef(), resolveTypeDef(), MemberList::setAnonymousEnumType(), setCallContextForVar(), setClassScope(), showFileDefMatches(), ManGenerator::startDoxyAnchor(), stripPath(), NamespaceDefImpl::updateLocalName(), version(), writeDefArgumentList(), MemberDefImpl::writeDocumentation(), MemberDefImpl::writeEnumDeclaration(), writeMscGraphFromFile(), PlantumlManager::writePlantUMLSource(), FlowChart::writeShape(), and DotNode::writeUrl().

◆ findRev() [2/2]

int QCString::findRev ( const char * str,
int index = -1,
bool cs = TRUE ) const

Definition at line 123 of file qcstring.cpp.

124{
125 int slen = static_cast<int>(qstrlen(str));
126 int len = static_cast<int>(length());
127 if (index<0) index = len-slen; // start from end
128 else if (index>len) return -1; // bad index
129 else if (index+slen>len) index=len-slen; // str would be too long
130 if (index<0) return -1; // no match possible
131 const char *pos = data()+index;
132 if (cs) // case sensitive
133 {
134 for (int i=index; i>=0; i--) if (qstrncmp(pos--,str,slen)==0) return i;
135 }
136 else // case insensitive
137 {
138 for (int i=index; i>=0; i--) if (qstrnicmp(pos,str,slen)==0) return i;
139 }
140 return -1;
141}

References data(), length(), qstrlen(), qstrncmp(), qstrnicmp(), and str().

◆ insert() [1/4]

QCString & QCString::insert ( size_t index,
char c )
inline

Definition at line 375 of file qcstring.h.

376 {
377 char s[2] = { c, '\0' };
378 return insert(index,s);
379 }
QCString & insert(size_t index, const QCString &s)
Definition qcstring.h:317

References insert(), and QCString().

◆ insert() [2/4]

QCString & QCString::insert ( size_t index,
const char * s )
inline

Definition at line 355 of file qcstring.h.

356 {
357 size_t len = s ? qstrlen(s) : 0;
358 if (len>0)
359 {
360 size_t ol = m_rep.size();
361 if (index>ol) // insert beyond end of string and fill gap with spaces
362 {
363 m_rep.resize(index+len);
364 std::memset(&m_rep[ol],' ',index-ol);
365 std::memcpy(&m_rep[index],s,len+1);
366 }
367 else // insert inside the string
368 {
369 m_rep.insert(index,s);
370 }
371 }
372 return *this;
373 }

References m_rep, QCString(), and qstrlen().

◆ insert() [3/4]

QCString & QCString::insert ( size_t index,
const QCString & s )
inline

Definition at line 317 of file qcstring.h.

318 {
319 if (s.length()>0)
320 {
321 size_t ol = m_rep.size();
322 if (index>ol) // insert beyond end of string and fill gap with spaces
323 {
324 m_rep.resize(index+s.length());
325 std::memset(&m_rep[ol],' ',index-ol);
326 std::memcpy(&m_rep[index],s.data(),s.length()+1);
327 }
328 else // insert inside the string
329 {
330 m_rep.insert(index,s.str());
331 }
332 }
333 return *this;
334 }

References data(), length(), m_rep, QCString(), and str().

Referenced by FileDefImpl::addIncludedUsingDirectives(), insert(), prepend(), prepend(), prepend(), prepend(), and replace().

◆ insert() [4/4]

QCString & QCString::insert ( size_t index,
std::string_view s )
inline

Definition at line 336 of file qcstring.h.

337 {
338 if (s.length()>0)
339 {
340 size_t ol = m_rep.size();
341 if (index>ol) // insert beyond end of string and fill gap with spaces
342 {
343 m_rep.resize(index+s.length());
344 std::memset(&m_rep[ol],' ',index-ol);
345 std::memcpy(&m_rep[index],s.data(),s.length()+1);
346 }
347 else // insert inside the string
348 {
349 m_rep.insert(index,s);
350 }
351 }
352 return *this;
353 }

References m_rep, and QCString().

◆ isEmpty()

bool QCString::isEmpty ( ) const
inline

Returns TRUE iff the string is empty.

Definition at line 150 of file qcstring.h.

150{ return m_rep.empty(); }

References m_rep.

Referenced by DefinitionImpl::_setBriefDescription(), DefinitionImpl::_setDocumentation(), HtmlCodeGenerator::_writeCodeLink(), MemberDefImpl::_writeGroupInclude(), DefinitionImpl::_writeSourceRefList(), abbreviate(), SymbolResolver::Private::accessibleViaUsingDefinition(), SymbolResolver::Private::accessibleViaUsingNamespace(), FileDefImpl::acquireFileVersion(), addAnchor(), DotClassGraph::addClass(), addClassToContext(), addClassToGroups(), addConceptToContext(), Crawlmap::addContentsItem(), DocSets::addContentsItem(), EclipseHelp::addContentsItem(), HtmlHelp::addContentsItem(), Qhp::addContentsItem(), addDefine(), addDefineDoc(), DocGroup::addDocs(), ModuleManager::addDocs(), DotGroupCollaboration::addEdge(), addEnumDocs(), addEnumValuesToEnums(), DotGfxHierarchyTable::addHierarchy(), addHtmlExtensionIfMissing(), ModuleManager::addImport(), FileDefImpl::addIncludedByDependency(), FileDefImpl::addIncludeDependency(), addIncludeFile(), PerlModGenerator::addIncludeInfo(), Crawlmap::addIndexItem(), HtmlHelp::addIndexItem(), LatexGenerator::addIndexItem(), Qhp::addIndexItem(), RTFGenerator::addIndexItem(), addInstance(), HtmlHelpIndex::addItem(), addKnRArgInfo(), LatexGenerator::addLabel(), PerlModDocVisitor::addLink(), addMemberDocs(), addMemberFunction(), addMemberToGroups(), addMemberToSearchIndex(), addModule(), addNamespaceToGroups(), addPerlModDocBlock(), VHDLOutlineParser::addProto(), addRefItem(), addRelatedPage(), addRelatedPage(), addSection(), addSeparatorsIfNeeded(), GrowBuf::addStr(), TooltipManager::addTooltip(), ClassDefImpl::addTypeConstraint(), ClassDefImpl::addTypeConstraints(), addUsingDirective(), addVariable(), addVariableToClass(), addVariableToFile(), addXRefItem(), adjustConfiguration(), applyModifiers(), argListToString(), buildClassDocList(), buildClassList(), buildDefineList(), buildExampleList(), buildFileList(), buildFileName(), buildGroupListFiltered(), buildNamespaceList(), buildPageList(), buildScopeFromQualifiedName(), Config::checkAndCorrect(), DocParser::checkArgumentName(), checkBlocks(), checkForKnRstyleC(), VHDLOutlineParser::checkInlineCode(), checkList(), checkMarkdownMainfile(), DocParser::checkRetvalName(), DocParser::checkUnOrMultipleDocumentedParams(), checkVhdlString(), ClassDefImpl::ClassDefImpl(), FlowChart::codify(), HtmlCodeGenerator::codify(), LatexCodeGenerator::codify(), ManCodeGenerator::codify(), RTFCodeGenerator::codify(), codifyLines(), codifyLines(), codifyLines(), codifyLines(), codifyLines(), codifyMapLines(), combineArgsAndException(), combineDeclarationAndDefinition(), computeClassRelations(), computeExpression(), DotGraph::computeGraph(), computePageRelations(), computeVerifiedDotPath(), ConceptDefImpl::ConceptDefImpl(), configFileToString(), configStringRecode(), containsWord(), convertCharEntitiesToUTF8(), DotNode::convertLabel(), convertMapFile(), convertNameToFile(), convertStringToBool(), convertToComment(), convertToDocBook(), convertToHtml(), convertToId(), convertToJSString(), convertToPSString(), convertToXML(), copyIcon(), copyLogo(), copyStyleSheet(), correctId(), Portable::correctPath(), correctURL(), createDVIFile(), VHDLOutlineParser::createFunction(), createHtmlUrl(), FormulaManager::createLatexFile(), createOutputDirectory(), createRef(), dateTimeFromString(), deliverablesPresent(), MemberDefImpl::detectUndocumentedParams(), MemberGroup::distributeMemberGroupDocumentation(), DocCite::DocCite(), DocFormula::DocFormula(), ManGenerator::docify(), RTFGenerator::docify(), HtmlGenerator::docify_(), docifyToString(), docifyToString(), DocRef::DocRef(), DotClassGraph::DotClassGraph(), anonymous_namespace{tagreader.cpp}::TagFileParser::dump(), elemIsVisible(), encodeForOutput(), HtmlGenerator::endDotGraph(), RTFGenerator::endDoxyAnchor(), HtmlGenerator::endIndexItem(), LatexGenerator::endIndexItem(), RTFGenerator::endIndexItem(), RTFGenerator::endIndexSection(), RTFGenerator::endIndexValue(), LatexDocVisitor::endLink(), RTFDocVisitor::endLink(), HtmlGenerator::endMemberDeclaration(), HtmlGenerator::endMemberTemplateParams(), LatexGenerator::endPageRef(), RTFGenerator::endPageRef(), endQuickIndexItem(), DocbookGenerator::endTitleHead(), LatexGenerator::endTitleHead(), RTFGenerator::endTitleHead(), escapeAt(), escapeCharsInString(), escapeDoubleQuotes(), escapeSpecialChars(), escapeTooltip(), Htags::execute(), ExistsOnPath(), expandExpression(), externalRef(), DefinitionImpl::externalReference(), extractCanonicalArgType(), extractCanonicalType(), extractClassNameFromType(), extractNamespaceName(), extractTrailingComment(), field2URL(), MemberDefImpl::fieldType(), FileDefImpl::FileDefImpl(), fileToString(), HtmlDocVisitor::filter(), ManDocVisitor::filter(), RTFDocVisitor::filter(), TextDocVisitor::filter(), filterId(), filterLatexString(), filterMemberDocumentation(), HtmlDocVisitor::filterQuotedCdataAttr(), findClassRelation(), findDefineDocumentation(), DocParser::findDocsForMemberOrCompound(), Markdown::Private::findEmphasisChar(), Markdown::Private::findEndOfLine(), findEnumDocumentation(), findEnums(), findFile(), findFileDef(), findGlobalMember(), findGroupScope(), FlowChart::findLabel(), findMainPage(), findMember(), findMemberDocumentation(), findMembersWithSpecificName(), findPackageScope(), findPackageScopeFromPath(), DocTokenizer::findSections(), findTemplateSpecializationPosition(), findUsedClassesForClass(), findUsingDeclarations(), findUsingDeclImports(), findUsingDirectives(), VariableContext::findVariable(), fixArgumentListForJavaScript(), format_warn(), generateBriefDoc(), generateClassOrGlobalLink(), generateClassOrGlobalLink(), generateClassOrGlobalLink(), generateDEFForMember(), OutputList::generateDoc(), generateFileRef(), generateFunctionLink(), generateFunctionLink(), FormulaManager::generateImages(), generateJSNavTree(), generateMemberLink(), generateMemLink(), generateOutput(), CitationManager::generatePage(), PerlModGenerator::generatePerlModForMember(), PerlModGenerator::generatePerlModSection(), generateSqlite3ForClass(), generateSqlite3ForMember(), generateSqlite3ForPage(), generateXMLForClass(), generateXMLForMember(), generateXMLForPage(), genericCompareMembers(), getBibFile(), getCanonicalTemplateSpec(), getCanonicalTypeForIdentifier(), getClass(), VhdlDocGen::getClass(), MemberDefImpl::getClassDefOfAnonymousType(), getConcept(), getConvertLatexMacro(), getCurrentChar(), getCurrentDateTime(), getDefsNew(), getDefsOld(), getExtension(), FilterCache::getFileContents(), getFileFilter(), getFileNameExtension(), CitationManager::getFormulas(), getFortranDefs(), getFortranNamespaceDefs(), getFortranTypeDefs(), getFullProjectName(), getLanguageFromFileName(), getLink(), getLink(), getLink(), getLinkInScope(), getLinkInScope(), getMemberFromSymbol(), getNextChar(), MemberDefImpl::getOutputFileBase(), ParserManager::getParsers(), getPrefixIndex(), getProjectId(), Qhp::getQchFileName(), MemberDefImpl::getReference(), getResolvedNamespace(), SymbolResolver::Private::getResolvedSymbol(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedType(), SymbolResolver::Private::getResolvedTypeRec(), getScopeDefs(), getSQLDocBlock(), getSubdir(), GroupDefImpl::GroupDefImpl(), DocPara::handleCommand(), VHDLOutlineParser::handleCommentBlock(), DocPara::handleDoxyConfig(), handleGuard(), DocPara::handleHtmlStartTag(), DocParser::handleImage(), handleInheritanceGraph(), DocPara::handleLink(), handleParametersCommentBlocks(), DocPara::handleShowDate(), DocPara::handleStartCode(), handleToc(), DefinitionImpl::hasBriefDescription(), DirDefImpl::hasDetailedDescription(), MemberDefImpl::hasDetailedDescription(), ModuleDefImpl::hasDetailedDescription(), PerlModOutput::iaddQuoted(), inheritDocumentation(), ClassDefImpl::IMPL::init(), ConfigImpl::init(), RTFGenerator::init(), initDoxygen(), DocSets::initialize(), EclipseHelp::initialize(), HtmlHelpRecoder::initialize(), Qhp::initialize(), initPredefined(), initTracing(), initUCF(), CitationManager::insertCrossReferencesForBibFile(), insertMemberFunctionParams(), insertRefid(), insertTemplateSpecifierInScope(), DocParser::internalValidatingParseDoc(), SymbolResolver::Private::isAccessibleFromWithExpScope(), ClassDefImpl::isBaseClass(), MemberDefImpl::isBriefSectionVisible(), isClassSection(), ClassDefImpl::isExtension(), NamespaceDefImpl::isLinkableInProject(), isLinkRef(), isLowerCase(), isVarWithConstructor(), CitationManager::latexBibFiles(), latexEscapeIndexChars(), latexEscapeLabelName(), latexEscapePDFString(), latexFilterURL(), letterToLabel(), HtmlGenerator::lineBreak(), VHDLOutlineParser::lineCount(), linkifyText(), linkToText(), mainPageHasOwnTitle(), makeFileName(), makeFileName(), makeIndex(), makeQualifiedNameWithTemplateParameters(), makeRef(), makeRef(), makeURL(), Mapper< T >::map(), matchArgument2(), matchExcludedSymbols(), mergeArguments(), mergeScopes(), NamespaceDefImpl::NamespaceDefImpl(), DefinitionImpl::navigationPathAsString(), node2URL(), objectLinkToString(), objectLinkToString(), objectLinkToString(), DocbookGenerator::openSection(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), PerlModDocVisitor::operator()(), PerlModDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), TextDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), SymbolModifiers::operator|=(), organizeSubGroupsFiltered(), Translator::p_latexCommandName(), CondParser::parse(), DocSection::parse(), DocXRefItem::parse(), CCodeParser::parseCode(), FileCodeParser::parseCode(), FortranCodeParser::parseCode(), LexCodeParser::parseCode(), PythonCodeParser::parseCode(), SQLCodeParser::parseCode(), VHDLCodeParser::parseCode(), XMLCodeParser::parseCode(), CodeFragmentManager::parseCodeFragment(), parseCommentAsText(), CommentScanner::parseCommentBlock(), parseFuncDecl(), MarkdownOutlineParser::parseInput(), parseInput(), VHDLOutlineParser::parseInput(), parsePrototype(), parsePrototype(), VhdlDocGen::parseUCF(), Htags::path2URL(), DefinitionImpl::pathFragment(), VhdlDocGen::prepareComment(), printNavLayout(), printNavTree(), Markdown::process(), Markdown::Private::processBlocks(), processConcatOperators(), Markdown::Private::processLink(), processList(), Markdown::Private::processSpecialCommand(), projectLogoFile(), projectLogoSize(), qPrint(), readCodeFragment(), readConfiguration(), readFileOrDirectory(), readIncludeFile(), readInputFile(), readTagFile(), DocParser::readTextFileByName(), Portable::recodeUtf8StringToW(), ParserManager::registerExtension(), relativePathToRoot(), removeAnonymousScopes(), removeIdsAndMarkers(), removeMarkers(), removeRedundantWhiteSpace(), replaceAnonymousScopes(), replaceColorMarkers(), CitationManager::replaceFormulas(), replaceFunctionMacro(), replaceRef(), resolveClassNestingRelations(), resolveLink(), ModuleManager::resolvePartitionsRecursively(), resolveRef(), resolveTypeDef(), MemberDefImpl::resolveUnnamedParameters(), runPlantumlContent(), selectBlocks(), DefinitionImpl::setBriefDescription(), setCallContextForVar(), SearchIndex::setCurrentDoc(), SearchIndexExternal::setCurrentDoc(), DefinitionImpl::setDocumentation(), setDotFontPath(), Portable::setenv(), GroupDefImpl::setGroupTitleLocal(), DefinitionImpl::setInbodyDocumentation(), ClassDefImpl::setIncludeFile(), ConceptDefImpl::setIncludeFile(), showFileDefMatches(), simplifyWhiteSpace(), MemberDefImpl::sourceRefName(), splitSearchTokens(), DocbookGenerator::startDescTable(), DocbookGenerator::startDoxyAnchor(), LatexGenerator::startDoxyAnchor(), DocbookGenerator::startFile(), startFile(), HtmlGenerator::startIndexItem(), LatexGenerator::startIndexItem(), RTFGenerator::startIndexSection(), DocbookDocVisitor::startLink(), HtmlDocVisitor::startLink(), LatexDocVisitor::startLink(), RTFDocVisitor::startLink(), XmlDocVisitor::startLink(), LayoutParser::startMemberDeclEntry(), LayoutParser::startMemberDefEntry(), HtmlGenerator::startMemberDescription(), DocbookGenerator::startMemberDoc(), LatexGenerator::startMemberDoc(), RTFGenerator::startMemberDoc(), DocbookGenerator::startMemberDocSimple(), HtmlGenerator::startMemberHeader(), HtmlGenerator::startMemberItem(), LayoutParser::startNavEntry(), startOfRequiresExpression(), HtmlGenerator::startParagraph(), LatexGenerator::startParameterType(), RTFGenerator::startParameterType(), startQuickIndexItem(), LayoutParser::startSectionEntry(), startsWith(), LatexGenerator::startTextLink(), RTFGenerator::startTextLink(), Image::stringLength, stringToArgumentList(), stripAnonymousNamespaceScope(), stripIndentation(), stripIndentationVerbatim(), stripLeadingAndTrailingEmptyLines(), stripLeadingAndTrailingEmptyLines(), stripProtectionPrefix(), subrHandleCommentBlock(), subrHandleCommentBlockResult(), substEnvVarsInString(), substEnvVarsInStrList(), substitute(), substitute(), substituteHtmlKeywords(), substituteKeywords(), substituteLatexKeywords(), substituteTemplateArgumentsInString(), substituteTemplatesInString(), SymbolResolver::Private::substTypedef(), Portable::system(), transcodeCharacterBuffer(), transferArgumentDocumentation(), TranslatorAfrikaans::trDocumentation(), TranslatorArabic::trDocumentation(), TranslatorArmenian::trDocumentation(), TranslatorBrazilian::trDocumentation(), TranslatorBulgarian::trDocumentation(), TranslatorCatalan::trDocumentation(), TranslatorChinese::trDocumentation(), TranslatorChinesetraditional::trDocumentation(), TranslatorCroatian::trDocumentation(), TranslatorCzech::trDocumentation(), TranslatorDanish::trDocumentation(), TranslatorDutch::trDocumentation(), TranslatorEnglish::trDocumentation(), TranslatorEsperanto::trDocumentation(), TranslatorFinnish::trDocumentation(), TranslatorFrench::trDocumentation(), TranslatorGerman::trDocumentation(), TranslatorGreek::trDocumentation(), TranslatorHindi::trDocumentation(), TranslatorHungarian::trDocumentation(), TranslatorIndonesian::trDocumentation(), TranslatorItalian::trDocumentation(), TranslatorJapanese::trDocumentation(), TranslatorKorean::trDocumentation(), TranslatorLatvian::trDocumentation(), TranslatorLithuanian::trDocumentation(), TranslatorMacedonian::trDocumentation(), TranslatorNorwegian::trDocumentation(), TranslatorPersian::trDocumentation(), TranslatorPolish::trDocumentation(), TranslatorPortuguese::trDocumentation(), TranslatorRomanian::trDocumentation(), TranslatorRussian::trDocumentation(), TranslatorSerbian::trDocumentation(), TranslatorSerbianCyrillic::trDocumentation(), TranslatorSlovak::trDocumentation(), TranslatorSlovene::trDocumentation(), TranslatorSpanish::trDocumentation(), TranslatorSwedish::trDocumentation(), TranslatorTurkish::trDocumentation(), TranslatorUkrainian::trDocumentation(), TranslatorVietnamese::trDocumentation(), TranslatorAfrikaans::trGeneratedAt(), TranslatorArabic::trGeneratedAt(), TranslatorArmenian::trGeneratedAt(), TranslatorBrazilian::trGeneratedAt(), TranslatorBulgarian::trGeneratedAt(), TranslatorCatalan::trGeneratedAt(), TranslatorChinese::trGeneratedAt(), TranslatorChinesetraditional::trGeneratedAt(), TranslatorCroatian::trGeneratedAt(), TranslatorCzech::trGeneratedAt(), TranslatorDanish::trGeneratedAt(), TranslatorDutch::trGeneratedAt(), TranslatorEnglish::trGeneratedAt(), TranslatorEsperanto::trGeneratedAt(), TranslatorFinnish::trGeneratedAt(), TranslatorFrench::trGeneratedAt(), TranslatorGerman::trGeneratedAt(), TranslatorGreek::trGeneratedAt(), TranslatorHindi::trGeneratedAt(), TranslatorHungarian::trGeneratedAt(), TranslatorIndonesian::trGeneratedAt(), TranslatorItalian::trGeneratedAt(), TranslatorJapanese::trGeneratedAt(), TranslatorKorean::trGeneratedAt(), TranslatorLatvian::trGeneratedAt(), TranslatorLithuanian::trGeneratedAt(), TranslatorMacedonian::trGeneratedAt(), TranslatorNorwegian::trGeneratedAt(), TranslatorPersian::trGeneratedAt(), TranslatorPolish::trGeneratedAt(), TranslatorPortuguese::trGeneratedAt(), TranslatorRomanian::trGeneratedAt(), TranslatorRussian::trGeneratedAt(), TranslatorSerbian::trGeneratedAt(), TranslatorSerbianCyrillic::trGeneratedAt(), TranslatorSlovak::trGeneratedAt(), TranslatorSlovene::trGeneratedAt(), TranslatorSpanish::trGeneratedAt(), TranslatorSwedish::trGeneratedAt(), TranslatorTurkish::trGeneratedAt(), TranslatorUkrainian::trGeneratedAt(), TranslatorVietnamese::trGeneratedAt(), TranslatorAfrikaans::trGeneratedAutomatically(), TranslatorArabic::trGeneratedAutomatically(), TranslatorArmenian::trGeneratedAutomatically(), TranslatorBrazilian::trGeneratedAutomatically(), TranslatorBulgarian::trGeneratedAutomatically(), TranslatorCatalan::trGeneratedAutomatically(), TranslatorChinese::trGeneratedAutomatically(), TranslatorChinesetraditional::trGeneratedAutomatically(), TranslatorCroatian::trGeneratedAutomatically(), TranslatorCzech::trGeneratedAutomatically(), TranslatorDanish::trGeneratedAutomatically(), TranslatorDutch::trGeneratedAutomatically(), TranslatorEnglish::trGeneratedAutomatically(), TranslatorEsperanto::trGeneratedAutomatically(), TranslatorFrench::trGeneratedAutomatically(), TranslatorGerman::trGeneratedAutomatically(), TranslatorGreek::trGeneratedAutomatically(), TranslatorHindi::trGeneratedAutomatically(), TranslatorHungarian::trGeneratedAutomatically(), TranslatorIndonesian::trGeneratedAutomatically(), TranslatorItalian::trGeneratedAutomatically(), TranslatorJapanese::trGeneratedAutomatically(), TranslatorKorean::trGeneratedAutomatically(), TranslatorLatvian::trGeneratedAutomatically(), TranslatorLithuanian::trGeneratedAutomatically(), TranslatorMacedonian::trGeneratedAutomatically(), TranslatorNorwegian::trGeneratedAutomatically(), TranslatorPersian::trGeneratedAutomatically(), TranslatorPolish::trGeneratedAutomatically(), TranslatorPortuguese::trGeneratedAutomatically(), TranslatorRomanian::trGeneratedAutomatically(), TranslatorRussian::trGeneratedAutomatically(), TranslatorSerbian::trGeneratedAutomatically(), TranslatorSerbianCyrillic::trGeneratedAutomatically(), TranslatorSlovak::trGeneratedAutomatically(), TranslatorSlovene::trGeneratedAutomatically(), TranslatorSpanish::trGeneratedAutomatically(), TranslatorSwedish::trGeneratedAutomatically(), TranslatorTurkish::trGeneratedAutomatically(), TranslatorUkrainian::trGeneratedAutomatically(), TranslatorVietnamese::trGeneratedAutomatically(), TranslatorBrazilian::trModuleMembersDescriptionTotal(), TranslatorEnglish::trModuleMembersDescriptionTotal(), TranslatorPortuguese::trModuleMembersDescriptionTotal(), TranslatorBrazilian::trNamespaceMembersDescriptionTotal(), TranslatorEnglish::trNamespaceMembersDescriptionTotal(), TranslatorPortuguese::trNamespaceMembersDescriptionTotal(), TranslatorSpanish::trNamespaceMembersDescriptionTotal(), tryPath(), unescapeCharsInString(), Portable::unsetenv(), updateLanguageMapping(), Config::updateObsolete(), DotAttributes::updateValue(), LayoutNavEntry::url(), validatingParseDoc(), validatingParseText(), version(), DocbookDocVisitor::visitPreStart(), visitPreStart(), visitPreStart(), warn_line(), MemberDefImpl::warnIfUndocumentedParams(), writeAlphabeticalClassList(), LatexGenerator::writeAnchor(), RTFGenerator::writeAnchor(), DotNode::writeArrow(), LatexCodeGenerator::writeCodeLink(), ManCodeGenerator::writeCodeLink(), RTFCodeGenerator::writeCodeLink(), ClassDefImpl::writeDeclaration(), MemberDefImpl::writeDeclaration(), ClassDefImpl::writeDeclarationLink(), ConceptDefImpl::writeDeclarationLink(), ModuleDefImpl::writeDeclarationLink(), MemberList::writeDeclarations(), writeDefArgumentList(), writeDEFString(), DefinitionImpl::writeDocAnchorsToTagFile(), writeDocbookCodeString(), writeDocbookLink(), MemberDefImpl::writeDocumentation(), MemberList::writeDocumentation(), ModuleDefImpl::writeExports(), HtmlGenerator::writeExternalSearchPage(), HtmlHelpIndex::writeFields(), writeFileIndex(), ModuleDefImpl::writeFiles(), FlowChart::writeFlowLinks(), writeFont(), VhdlDocGen::writeFormatString(), writeFuncProto(), VhdlDocGen::writeFunctionProto(), DotGraph::writeGraphHeader(), ClassDefImpl::writeIncludeFiles(), ConceptDefImpl::writeIncludeFiles(), ClassDefImpl::writeIncludeFilesForSlice(), writeIncludeInfo(), writeIndex(), writeIndexHierarchyEntries(), HtmlGenerator::writeInheritedSectionTitle(), writeJavasScriptSearchDataPage(), DocbookCodeGenerator::writeLineNumber(), HtmlCodeGenerator::writeLineNumber(), LatexCodeGenerator::writeLineNumber(), RTFCodeGenerator::writeLineNumber(), XMLCodeGenerator::writeLineNumber(), TextGeneratorSqlite3Impl::writeLink(), DocbookGenerator::writeLocalToc(), HtmlGenerator::writeLocalToc(), writeMapArea(), Markdown::Private::writeMarkdownImage(), MemberDefImpl::writeMemberDocSimple(), ClassDefImpl::writeMemberList(), writeMemberList(), writeMemberReference(), writeMscImageMapFromFile(), writeMultiLineCodeLink(), writeMultiLineCodeLink(), writeNamespaceTreeElement(), HtmlDocVisitor::writeObfuscatedMailAddress(), writeObjCMethodCall(), HtmlGenerator::writeObjectLink(), PageDefImpl::writePageDocumentation(), writePages(), PlantumlManager::writePlantUMLSource(), VhdlDocGen::writeRecordUnit(), FlowChart::writeShape(), writeSingleFileIndex(), VhdlDocGen::writeSource(), FileDefImpl::writeSourceBody(), DefinitionImpl::writeSourceDef(), HtmlGenerator::writeStartAnnoItem(), LatexGenerator::writeStartAnnoItem(), RTFGenerator::writeStartAnnoItem(), Image::writeString(), ConfigOption::writeStringValue(), HtmlGenerator::writeSummaryLink(), ClassDefImpl::writeTagFile(), ConceptDefImpl::writeTagFile(), MemberDefImpl::writeTagFile(), ModuleDefImpl::writeTagFile(), NamespaceDefImpl::writeTagFile(), writeTagFile(), ClassDefImpl::writeTemplateSpec(), DocSets::writeToken(), HtmlCodeGenerator::writeTooltip(), VhdlDocGen::writeVHDLDeclaration(), VhdlDocGen::writeVHDLDeclarations(), VhdlDocGen::writeVhdlLink(), writeWord(), writeXMLCodeString(), writeXMLDocBlock(), writeXMLLink(), and HtmlEntityMapper::writeXMLSchema().

◆ left()

QCString QCString::left ( size_t len) const
inline

Definition at line 214 of file qcstring.h.

215 {
216 return m_rep.empty() ? QCString() : QCString(m_rep.substr(0,len));
217 }
QCString()=default

References m_rep, and QCString().

Referenced by MemberDefImpl::_computeIsConstructor(), MemberDefImpl::_writeCategoryRelation(), MemberDefImpl::_writeReimplements(), abbreviate(), VhdlDocGen::addBaseClass(), addCite(), addClassToContext(), VHDLOutlineParser::addCompInst(), addEnumValuesToEnums(), DocSets::addIndexItem(), addMacroDefinition(), addMemberFunction(), addRelatedPage(), addTemplateNames(), adjustConfiguration(), alignText(), argListToString(), buildDirectories(), buildFileList(), DocParser::checkArgumentName(), checkList(), DocParser::checkUnOrMultipleDocumentedParams(), codifyLines(), combineArgsAndException(), computeCommonDirPrefix(), DotFilePatcher::convertMapFile(), convertNameToFile(), convertToHtmlAndTruncate(), ResourceMgr::copyResourceAs(), VhdlDocGen::correctMemberProperties(), createTagLessInstance(), determineBlockName(), MemberDefImpl::displayDefinition(), DocInternalRef::DocInternalRef(), expandExpression(), extractClassName(), extractLanguageSpecificTitle(), extractNamespaceName(), extractNoExcept(), Markdown::Private::extractTitleId(), fillColorStyleMap(), filterMemberDocumentation(), DocParser::findAndCopyImage(), findClassRelation(), findDirDocumentation(), DocParser::findDocsForMemberOrCompound(), findEnumDocumentation(), findEnums(), findFileDef(), findGlobalMember(), findMember(), findPackageScopeFromPath(), findScopeFromQualifiedName(), findUsingDeclImports(), findUsingDirectives(), generateClassOrGlobalLink(), generateClassOrGlobalLink(), generateFunctionLink(), generateFunctionLink(), generateMemberLink(), CitationManager::generatePage(), generateXMLForMember(), getBaseNameOfOutput(), MemberDefImpl::getClassDefOfAnonymousType(), getDefsOld(), getDotImageExtension(), getFilteredImageAttributes(), getFilterFromList(), getMemberFromSymbol(), ParserManager::getParsers(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedTypeRec(), getScopeDefs(), getTemplateArgumentsFromName(), DocPara::handleCommand(), handleToc(), initUCF(), insertTemplateSpecifierInScope(), Markdown::Private::isAtxHeader(), isCastKeyword(), MemberDefImpl::isDocumentedFriendClass(), isRecursiveBaseClass(), isURL(), isVarWithConstructor(), DiagramItem::label(), leftScopeMatch(), Htags::loadFilemap(), makeBaseName(), makeBaseName(), makeBaseName(), makeDisplayName(), makeTemplateInstanceRelation(), markdownFileNameToId(), matchCanonicalTypes(), matchExcludedSymbols(), mergeArguments(), mergeCategories(), DirDefImpl::mergeDirectoryInTree(), ClassDefImpl::mergeMembersFromBaseClasses(), mergeScopes(), SymbolResolver::Private::newResolveTypedef(), normalizeNonTemplateArgumentsInString(), LatexDocVisitor::operator()(), DocLink::parse(), parseCommentAsText(), parseFuncDecl(), VhdlDocGen::parseFuncProto(), MarkdownOutlineParser::parseInput(), parseMain(), VhdlDocGen::parseUCF(), VHDLOutlineParser::popLabel(), FlowChart::printNode(), Markdown::Private::processLink(), projectLogoFile(), readTagFile(), replaceNamespaceAliasesRec(), replaceRef(), resolveRef(), resolveSymlink(), resolveTypeDef(), DotFilePatcher::run(), searchInputFiles(), searchTemplateSpecs(), setCallContextForVar(), setClassScope(), showFileDefMatches(), simplifyTypeForTable(), splitKnRArg(), splitString(), stripAnonymousNamespaceScope(), stripComment(), stripDeclKeywords(), stripExtensionGeneral(), stripFromPath(), stripFuncPtr(), stripIrrelevantString(), stripKnownExtensions(), stripWord(), substituteKeywords(), substituteTemplateArgumentsInString(), trimBaseClassScope(), MemberDefImpl::writeDeclaration(), DotNode::writeDEF(), writeDefArgumentList(), FileDefImpl::writeDetailedDescription(), DotNode::writeDocbook(), MemberDefImpl::writeDocumentation(), writeExceptionListImpl(), HtmlGenerator::writeExternalSearchPage(), HtmlHelpIndex::writeFields(), VhdlDocGen::writeFormatString(), writeGraphInfo(), ClassDefImpl::writeIncludeFilesForSlice(), MemberDefImpl::writeMemberDocSimple(), PlantumlManager::writePlantUMLSource(), VhdlDocGen::writeRecordUnit(), VhdlDocGen::writeSource(), DefinitionImpl::writeSourceDef(), DocSets::writeToken(), DotNode::writeUrl(), and DotNode::writeXML().

◆ length()

size_t QCString::length ( ) const
inline

Returns the length of the string, not counting the 0-terminator.

Equivalent to size().

Definition at line 153 of file qcstring.h.

153{ return m_rep.size(); }

References m_rep.

Referenced by DefinitionImpl::_docsAlreadyAdded(), DefinitionImpl::_setBriefDescription(), HtmlCodeGenerator::_writeCodeLink(), MemberDefImpl::_writeReimplements(), MemberDefImpl::_writeTemplatePrefix(), abbreviate(), VhdlDocGen::addBaseClass(), VHDLOutlineParser::addCompInst(), addEnumValuesToEnums(), addIncludeFile(), DocSets::addIndexItem(), addMacroDefinition(), addMemberToGroups(), addModule(), addRelatedPage(), addSeparatorsIfNeeded(), GrowBuf::addStr(), addTemplateNames(), ClassDefImpl::addTypeConstraints(), FlowChart::alignCommentNode(), FlowChart::alignFuncProc(), alignText(), buildDirectories(), buildFileName(), buildGroupListFiltered(), Config::checkAndCorrect(), DocParser::checkArgumentName(), checkExtension(), VHDLOutlineParser::checkInlineCode(), checkList(), DocParser::checkUnOrMultipleDocumentedParams(), checkVhdlString(), computeCommonDirPrefix(), computeQualifiedIndex(), computeVerifiedDotPath(), configStringRecode(), contains(), contains(), TranslatorPersian::convertDigitsToFarsi(), DotNode::convertLabel(), DotFilePatcher::convertMapFile(), convertNameToFile(), convertToHtmlAndTruncate(), ResourceMgr::copyResourceAs(), MemberList::countEnumValues(), createOutputDirectory(), createTagLessInstance(), detab(), DotClassGraph::determineVisibleNodes(), MemberDefImpl::displayDefinition(), DocAnchor::DocAnchor(), DocEmoji::DocEmoji(), docifyToString(), docifyToString(), DocInternalRef::DocInternalRef(), elemIsVisible(), encodeDirName(), encodeForOutput(), endsWith(), escapeId(), expandExpression(), externalRef(), DefinitionImpl::externalReference(), extractBeginRawStringDelimiter(), extractBind(), extractBlock(), extractCanonicalType(), extractClassNameFromType(), extractEndRawStringDelimiter(), extractFromParens(), extractLanguageSpecificTitle(), extractNamespaceName(), extractNoExcept(), extractTrailingComment(), filter2008VhdlComment(), filterMemberDocumentation(), find(), find(), DocParser::findAndCopyImage(), findClassRelation(), findDirDocumentation(), DocParser::findDocsForMemberOrCompound(), Markdown::Private::findEmphasisChar(), Markdown::Private::findEndOfLine(), findEndOfTemplate(), findEnumDocumentation(), findEnums(), findFileDef(), findMember(), findRev(), findRev(), findScopeFromQualifiedName(), findTemplateSpecializationPosition(), findUsingDeclImports(), findUsingDirectives(), format_warn(), VhdlDocGen::formatString(), generateAnonymousAnchor(), generateClassOrGlobalLink(), generateClassOrGlobalLink(), generateFunctionLink(), generateFunctionLink(), generateMemberLink(), CitationManager::generatePage(), PerlModGenerator::generatePerlModForMember(), getCanonicalTemplateSpec(), MemberDefImpl::getClassDefOfAnonymousType(), getConvertLatexMacro(), getCurrentChar(), getDefsOld(), getExtension(), getFileFilter(), getNextChar(), getNextId(), getParserForFile(), ParserManager::getParsers(), getProjectId(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedTypeRec(), getScopeDefs(), getScopeFragment(), handle_warn_as_error(), DocPara::handleStartCode(), handleToc(), insert(), insertTemplateSpecifierInScope(), Portable::isAbsolutePath(), Markdown::Private::isAtxHeader(), isConstraintFile(), DocImage::isSVG(), isVarWithConstructor(), DiagramItem::label(), latexEscapeIndexChars(), latexEscapeLabelName(), leftScopeMatch(), linkToText(), makeDisplayName(), matchArgument2(), matchExcludedSymbols(), DirDefImpl::matchPath(), mergeArguments(), ClassDefImpl::mergeMembersFromBaseClasses(), mergeScopes(), nameIsActuallyPartOfType(), SymbolResolver::Private::newResolveTypedef(), VHDLOutlineParser::oneLineComment(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), PerlModDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), TextDocVisitor::operator()(), XmlDocVisitor::operator()(), DocLink::parse(), FileCodeParser::parseCode(), parseCommentAsText(), parseFile(), parseFuncDecl(), VhdlDocGen::parseFuncProto(), MarkdownOutlineParser::parseInput(), parseMain(), Htags::path2URL(), Markdown::process(), Markdown::Private::processBlocks(), Markdown::Private::processLink(), processList(), Markdown::Private::processQuotations(), Markdown::Private::processSpecialCommand(), processString(), projectLogoSize(), DocTokenizer::pushBackHtmlTag(), readCodeFragment(), readIncludeFile(), readIncludeFile(), readTagFile(), HtmlHelpRecoder::recode(), Portable::recodeUtf8StringToW(), recognizeFixedForm(), removeEmptyLines(), removeRedundantWhiteSpace(), replaceFunctionMacro(), replaceVariables(), resolveRef(), resolveSymlink(), resolveTypeDef(), resolveUserReferences(), rightScopeMatch(), searchInputFiles(), searchTemplateSpecs(), selectBlocks(), MemberDefImpl::setAnchor(), MemberList::setAnonymousEnumType(), setCallContextForVar(), setClassScope(), showFileDefMatches(), simplifyTypeForTable(), simplifyWhiteSpace(), skipToEndMarker(), splitSearchTokens(), sprintf(), ManGenerator::startDoxyAnchor(), startsWithKeyword(), stringize(), stripAnonymousMarkers(), stripAnonymousNamespaceScope(), stripComment(), stripExtensionGeneral(), stripFromPath(), stripFuncPtr(), stripIrrelevantString(), stripKnownExtensions(), stripLeadingAndTrailingEmptyLines(), stripQuotes(), stripQuotes(), stripScope(), stripTemplateSpecifiers(), stripTemplateSpecifiersFromScope(), stripTrailingWhiteSpace(), stripWord(), subrHandleCommentBlock(), substEnvVarsInStrList(), substitute(), substitute(), substituteKeywords(), SymbolResolver::Private::substTypedef(), toLong(), toUInt64(), toULong(), trimBaseClassScope(), Trace::trunc(), TranslatorJapanese::trWriteList(), unputChar(), DocTokenizer::unputString(), validatingParseDoc(), DocbookCodeGenerator::writeCodeLink(), LatexCodeGenerator::writeCodeLink(), RTFCodeGenerator::writeCodeLink(), XMLCodeGenerator::writeCodeLink(), DocbookCodeGenerator::writeCodeLinkLine(), MemberDefImpl::writeDeclaration(), writeDefArgumentList(), FileDefImpl::writeDetailedDescription(), MemberDefImpl::writeDocumentation(), MemberDefImpl::writeEnumDeclaration(), HtmlGenerator::writeExternalSearchPage(), ClassDefImpl::writeIncludeFilesForSlice(), writeMscGraphFromFile(), PlantumlManager::writePlantUMLSource(), FlowChart::writeShape(), writeSingleFileIndex(), DefinitionImpl::writeSourceDef(), writeString(), ConfigOption::writeStringList(), ClassDefImpl::writeTemplateSpec(), DocSets::writeToken(), writeUCFLink(), DotNode::writeUrl(), writeWord(), and HtmlEntityMapper::writeXMLSchema().

◆ lower()

QCString QCString::lower ( ) const
inline

Definition at line 234 of file qcstring.h.

235 {
237 }
std::string convertUTF8ToLower(const std::string &input)
Converts the input string into a lower case version, also taking into account non-ASCII characters th...
Definition utf8.cpp:187

References convertUTF8ToLower(), m_rep, and QCString().

Referenced by VHDLOutlineParser::addCompInst(), DocSets::addIndexItem(), VHDLOutlineParser::addLibUseClause(), addLocalVar(), addSubprogram(), adjustConfiguration(), Config::checkAndCorrect(), DocParser::checkArgumentName(), checkFileName(), checkIfHtmlEndTagEndsAutoList(), DocParser::checkUnOrMultipleDocumentedParams(), codifyMapLines(), convertStringToBool(), VhdlDocGen::correctMemberProperties(), elemIsVisible(), endScope(), extractClassNameFromType(), CitationManager::find(), findArgument(), findFileDef(), VhdlDocGen::findKeyWord(), VhdlDocGen::findMember(), generateLink(), CitationManager::generatePage(), genericPatternMatch(), getFilteredImageAttributes(), getFilterFromList(), getFortranDefs(), getLanguageFromCodeLang(), getLanguageFromFileName(), getParameter(), ParserManager::getParsers(), guessSection(), DocPara::handleCommand(), handleFileInfoResult(), handleHtmlTag(), DocParser::handleImage(), handleImage(), handleInheritanceGraph(), handleToc(), MemberDefImpl::init(), CitationManager::insert(), CitationManager::insertCrossReferencesForBibFile(), keyWordsFortranC(), Mapper< T >::map(), COutlineParser::needsPreprocessing(), FortranOutlineParser::needsPreprocessing(), SymbolModifiers::operator|=(), MarkdownOutlineParser::parseInput(), Markdown::Private::processHtmlTagWrite(), Markdown::Private::processLink(), subrHandleCommentBlock(), subrHandleCommentBlockResult(), substituteHtmlKeywords(), updateLanguageMapping(), Config::updateObsolete(), Markdown::Private::writeBlockQuote(), and ClassDefImpl::writeTemplateSpec().

◆ mid()

QCString QCString::mid ( size_t index,
size_t len = static_cast<size_t>(-1) ) const
inline

Definition at line 226 of file qcstring.h.

227 {
228 size_t slen = m_rep.size();
229 if (len==static_cast<uint32_t>(-1)) len = slen-index;
230 return m_rep.empty() || index>slen || len==0 ? QCString() :
231 QCString(m_rep.substr(index,len));
232 }

References m_rep, and QCString().

Referenced by MemberDefImpl::_writeCategoryRelation(), MemberDefImpl::_writeEnumValues(), abbreviate(), addClassToContext(), addIncludeFile(), addMacroDefinition(), addMemberFunction(), addTemplateNames(), ClassDefImpl::addTypeConstraints(), adjustConfiguration(), argListToString(), buildScopeFromQualifiedName(), VHDLOutlineParser::checkInlineCode(), combineArgsAndException(), convertFileId2Var(), createJavaScriptSearchIndex(), Translator::createNoun(), MemberDefImpl::displayDefinition(), elemIsVisible(), ExistsOnPath(), expandExpression(), extractBeginRawStringDelimiter(), extractBind(), extractBlock(), extractCanonicalType(), extractClassNameFromType(), extractEndRawStringDelimiter(), extractLanguageSpecificTitle(), extractNoExcept(), Markdown::extractPageTitle(), extractPartAfterNewLine(), fillColorStyleMap(), VhdlDocGen::findAllArchitectures(), findClassRelation(), findGlobalMember(), findPackageScopeFromPath(), findParameterList(), findScopeFromQualifiedName(), SymbolResolver::Private::followPath(), generateClassOrGlobalLink(), generateFunctionLink(), CitationManager::generatePage(), PerlModGenerator::generatePerlModForMember(), PlantumlManager::generatePlantUMLOutput(), generateSqlite3ForMember(), generateXMLForMember(), getDefsOld(), getExtension(), getFileFilter(), getFileNameExtension(), getFilteredImageAttributes(), getFilterFromList(), getLanguageFromCodeLang(), getLinkInScope(), getMemberFromSymbol(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedTypeRec(), guessSection(), DocPara::handleCommand(), handleHtmlTag(), DocParser::handleImage(), handleImage(), DocParser::handleParameterType(), CitationManager::insertCrossReferencesForBibFile(), ClassDefImpl::isExtension(), DocImage::isSVG(), Htags::loadFilemap(), makeBaseName(), makeFileName(), makeFileName(), makeShortName(), makeShortName(), makeShortName(), makeTemplateInstanceRelation(), matchCanonicalTypes(), matchExcludedSymbols(), SymbolResolver::Private::newResolveTypedef(), node2URL(), normalizeNonTemplateArgumentsInString(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), TextDocVisitor::operator()(), XmlDocVisitor::operator()(), DocIncOperator::parse(), DocPara::parse(), DocParamList::parse(), FileCodeParser::parseCode(), VhdlDocGen::parseFuncProto(), Htags::path2URL(), VhdlDocGen::prepareComment(), Markdown::process(), Markdown::Private::processLink(), processString(), projectLogoSize(), readIncludeFile(), readIncludeFile(), removeLongPathMarker(), CitationManager::replaceFormulas(), replaceNamespaceAliasesRec(), replaceRef(), replaceVariables(), resolveRef(), resolveSymlink(), resolveTypeDef(), DotFilePatcher::run(), setClassScope(), splitKnRArg(), splitSearchTokens(), stripAnonymousNamespaceScope(), stripComment(), stripDeclKeywords(), stripLeadingAndTrailingEmptyLines(), stripPath(), stripProtectionPrefix(), stripQuotes(), stripQuotes(), stripTemplateSpecifiersFromScope(), stripTrailingReturn(), substEnvVarsInStrList(), substituteTemplateArgumentsInString(), substituteTemplatesInString(), TranslatorAfrikaans::trDayOfWeek(), TranslatorBrazilian::trDayOfWeek(), TranslatorCatalan::trDayOfWeek(), TranslatorCzech::trDayOfWeek(), TranslatorDanish::trDayOfWeek(), TranslatorDutch::trDayOfWeek(), TranslatorEsperanto::trDayOfWeek(), TranslatorFinnish::trDayOfWeek(), TranslatorFrench::trDayOfWeek(), TranslatorHungarian::trDayOfWeek(), TranslatorItalian::trDayOfWeek(), TranslatorLatvian::trDayOfWeek(), TranslatorLithuanian::trDayOfWeek(), TranslatorNorwegian::trDayOfWeek(), TranslatorPolish::trDayOfWeek(), TranslatorPortuguese::trDayOfWeek(), TranslatorRomanian::trDayOfWeek(), TranslatorSerbian::trDayOfWeek(), TranslatorSlovak::trDayOfWeek(), TranslatorSlovene::trDayOfWeek(), TranslatorSpanish::trDayOfWeek(), TranslatorSwedish::trDayOfWeek(), TranslatorAfrikaans::trMonth(), TranslatorBrazilian::trMonth(), TranslatorCatalan::trMonth(), TranslatorCzech::trMonth(), TranslatorDanish::trMonth(), TranslatorDutch::trMonth(), TranslatorEsperanto::trMonth(), TranslatorFinnish::trMonth(), TranslatorFrench::trMonth(), TranslatorHungarian::trMonth(), TranslatorItalian::trMonth(), TranslatorLatvian::trMonth(), TranslatorLithuanian::trMonth(), TranslatorNorwegian::trMonth(), TranslatorPolish::trMonth(), TranslatorPortuguese::trMonth(), TranslatorRomanian::trMonth(), TranslatorSerbian::trMonth(), TranslatorSlovak::trMonth(), TranslatorSlovene::trMonth(), TranslatorSpanish::trMonth(), TranslatorSwedish::trMonth(), NamespaceDefImpl::updateLocalName(), DotNode::writeDEF(), writeDefArgumentList(), DotNode::writeDocbook(), MemberDefImpl::writeDocumentation(), writeExceptionList(), writeExceptionListImpl(), writeGraphInfo(), Markdown::Private::writeMarkdownImage(), MemberDefImpl::writeMemberDocSimple(), writeObjCMethodCall(), DefinitionImpl::writeSourceDef(), ConfigOption::writeStringList(), DotNode::writeXML(), and HtmlEntityMapper::writeXMLSchema().

◆ operator+=() [1/4]

QCString & QCString::operator+= ( const char * s)
inline

Appends string str to this string and returns a reference to the result.

Definition at line 550 of file qcstring.h.

551 {
552 if (s) m_rep+=s;
553 return *this;
554 }

References m_rep, and QCString().

◆ operator+=() [2/4]

QCString & QCString::operator+= ( const QCString & s)
inline

Definition at line 531 of file qcstring.h.

532 {
533 m_rep+=s.str();
534 return *this;
535 }

References m_rep, QCString(), and str().

Referenced by append(), append(), append(), and append().

◆ operator+=() [3/4]

QCString & QCString::operator+= ( const std::string & s)
inline

Definition at line 537 of file qcstring.h.

538 {
539 m_rep+=s;
540 return *this;
541 }

References m_rep, and QCString().

◆ operator+=() [4/4]

QCString & QCString::operator+= ( std::string_view s)
inline

Definition at line 543 of file qcstring.h.

544 {
545 m_rep+=s;
546 return *this;
547 }

References m_rep, and QCString().

◆ operator=() [1/4]

QCString & QCString::operator= ( const char * str)
inline

replaces the contents by that of C string str.

Definition at line 145 of file qcstring.h.

145{ m_rep = str?str:""; return *this; }

References m_rep, QCString(), and str().

◆ operator=() [2/4]

QCString & QCString::operator= ( const JavaCCString & s)
inline

Definition at line 123 of file qcstring.h.

124 {
125 m_rep.resize(s.size());
126 memcpy(m_rep.data(),s.data(),s.size());
127 return *this;
128 }

References m_rep, and QCString().

◆ operator=() [3/4]

QCString & QCString::operator= ( const std::string & s)
inline

Definition at line 147 of file qcstring.h.

147{ m_rep = s; return *this; }

References m_rep, and QCString().

◆ operator=() [4/4]

QCString & QCString::operator= ( std::string_view sv)
inline

Definition at line 110 of file qcstring.h.

110 {
111 m_rep=sv;
112 return *this;
113 }

References m_rep, and QCString().

◆ operator[]() [1/2]

char & QCString::operator[] ( size_t i)
inline

Indexing operator.

Equivalent to at().

Definition at line 578 of file qcstring.h.

579 {
580 return m_rep[i];
581 }

References m_rep.

◆ operator[]() [2/2]

const char & QCString::operator[] ( size_t i) const
inline

Definition at line 583 of file qcstring.h.

584 {
585 return m_rep[i];
586 }

References m_rep.

◆ prepend() [1/4]

QCString & QCString::prepend ( const char * s)
inline

Definition at line 407 of file qcstring.h.

408 {
409 return insert(0,s);
410 }

References insert(), and QCString().

Referenced by addClassToContext(), addConceptToContext(), MemberDefImpl::addListReference(), addMemberFunction(), addModule(), addSTLClass(), ClassDefImpl::addUsedByClass(), ClassDefImpl::addUsedClass(), FlowChart::alignFuncProc(), MemberDefImpl::anchor(), convertNameToFile(), correctURL(), VHDLOutlineParser::createFlow(), createOutputDirectory(), MemberDefImpl::displayDefinition(), DocEmoji::DocEmoji(), externalRef(), DefinitionImpl::externalReference(), MemberDefImpl::fieldType(), filterMemberDocumentation(), findClassRelation(), DocParser::findDocsForMemberOrCompound(), findEnumDocumentation(), findEnums(), findMember(), generateDEFForMember(), generateOutput(), generatePHPVariableLink(), MemberDefImpl::getDeclType(), getExtension(), getLanguageFromFileName(), getLink(), getLink(), FlowChart::getNodeName(), getScopeDefs(), SymbolResolver::Private::newResolveTypedef(), HtmlDocVisitor::operator()(), parseFuncDecl(), MarkdownOutlineParser::parseInput(), processTagLessClasses(), projectLogoSize(), quoted(), replaceRef(), MemberDefImpl::setAnchor(), SearchIndex::setCurrentDoc(), setDotFontPath(), MemberDefImpl::sourceRefName(), LatexDocVisitor::startDiaFile(), LatexDocVisitor::startDotFile(), LatexDocVisitor::startMscFile(), substituteHtmlKeywords(), unputChar(), updateLanguageMapping(), MemberDefImpl::writeDeclaration(), writeDefArgumentList(), HtmlDocVisitor::writeDiaFile(), MemberDefImpl::writeDocumentation(), HtmlDocVisitor::writeDotFile(), writeIndexHierarchyEntries(), HtmlGenerator::writeInheritedSectionTitle(), VhdlDocGen::writeInlineClassLink(), LatexCodeGenerator::writeLineNumber(), RTFCodeGenerator::writeLineNumber(), MemberDefImpl::writeLink(), writeMemberReference(), HtmlDocVisitor::writeMscFile(), PlantumlManager::writePlantUMLSource(), writeSingleFileIndex(), VhdlDocGen::writeSource(), VhdlDocGen::writeVHDLDeclaration(), and VhdlDocGen::writeVhdlLink().

◆ prepend() [2/4]

QCString & QCString::prepend ( const QCString & s)
inline

Definition at line 412 of file qcstring.h.

413 {
414 return insert(0,s.data());
415 }

References data(), insert(), and QCString().

◆ prepend() [3/4]

QCString & QCString::prepend ( const std::string & s)
inline

Definition at line 417 of file qcstring.h.

418 {
419 return insert(0,s.c_str());
420 }

References insert(), and QCString().

◆ prepend() [4/4]

QCString & QCString::prepend ( std::string_view s)
inline

Definition at line 422 of file qcstring.h.

423 {
424 return insert(0,s);
425 }

References insert(), and QCString().

◆ quoted()

QCString QCString::quoted ( ) const
inline

Definition at line 260 of file qcstring.h.

261 {
262 size_t start=0, sl=m_rep.size(), end=sl-1;
263 while (start<sl && qisspace(m_rep[start])) start++; // skip over leading whitespace
264 if (start==sl) return QCString(); // only whitespace
265 while (end>start && qisspace(m_rep[end])) end--; // skip over trailing whitespace
266 bool needsQuotes=false;
267 size_t i=start;
268 if (i<end && m_rep[i]!='"') // stripped string has at least non-whitespace unquoted character
269 {
270 while (i<end && !needsQuotes) // check if the to be quoted part has at least one whitespace character
271 {
272 needsQuotes = m_rep[i] =='-';
273 needsQuotes |= qisspace(m_rep[i++]);
274 }
275 }
276 QCString result(m_rep.substr(start,1+end-start));
277 if (needsQuotes)
278 {
279 result.prepend("\"");
280 result.append("\"");
281 }
282 return result;
283 }
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
bool qisspace(char c)
Definition qcstring.h:81

References append(), end(), m_rep, prepend(), QCString(), and qisspace().

Referenced by projectLogoSize(), DotAttributes::updateValue(), writeLatexMakefile(), and writeMakeBat().

◆ rawData()

◆ remove()

QCString & QCString::remove ( size_t index,
size_t len )
inline

◆ removeWhiteSpace()

QCString QCString::removeWhiteSpace ( ) const
inline

returns a copy of this string with all whitespace removed

Definition at line 286 of file qcstring.h.

287 {
288 size_t sl = m_rep.size();
289 if (sl==0) return *this;
290 std::string result = m_rep;
291 size_t src=0,dst=0;
292 while (src<sl)
293 {
294 if (!qisspace(m_rep[src])) result[dst++]=m_rep[src];
295 src++;
296 }
297 if (dst<m_rep.size()) result.resize(dst);
298 return QCString(result);
299 }

References m_rep, QCString(), and qisspace().

◆ repeat()

QCString QCString::repeat ( unsigned int n) const
inline

Definition at line 306 of file qcstring.h.

307 {
308 QCString result(n * size(), ExplicitSize);
309 size_t offset = 0;
310 for (offset = 0; offset < n * size(); offset += size())
311 {
312 memcpy(result.rawData() + offset, data(), size());
313 }
314 return result;
315 }

References data(), ExplicitSize, QCString(), rawData(), and size().

◆ replace()

QCString & QCString::replace ( size_t index,
size_t len,
const char * s )

Definition at line 212 of file qcstring.cpp.

213{
214 remove( index, len );
215 insert( index, s );
216 return *this;
217}
QCString & remove(size_t index, size_t len)
Definition qcstring.h:427

References insert(), QCString(), and remove().

Referenced by VhdlDocGen::convertFileNameToClassName(), VhdlDocGen::formatString(), version(), writeClassTreeInsideNamespaceElement(), writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ reserve()

void QCString::reserve ( size_t size)
inline

Reserve space for size bytes without changing the string contents.

Definition at line 172 of file qcstring.h.

172{ m_rep.reserve(size); }

References m_rep, and size().

Referenced by docifyToString(), docifyToString(), selectBlocks(), and PlantumlManager::writePlantUMLSource().

◆ resize()

◆ right()

QCString QCString::right ( size_t len) const
inline

Definition at line 219 of file qcstring.h.

220 {
221 return m_rep.empty() ? QCString() :
222 len<m_rep.size() ? QCString(m_rep.substr(m_rep.size()-len,len)) :
223 *this;
224 }

References m_rep, and QCString().

Referenced by MemberDefImpl::_writeReimplements(), VhdlDocGen::addBaseClass(), VHDLOutlineParser::addCompInst(), addEnumValuesToEnums(), addMacroDefinition(), addModule(), addRelatedPage(), addTemplateNames(), ClassDefImpl::addTypeConstraints(), buildFileName(), checkExtension(), checkList(), computeCommonDirPrefix(), DotFilePatcher::convertMapFile(), MemberList::countEnumValues(), DocInternalRef::DocInternalRef(), expandExpression(), extractCanonicalType(), extractNamespaceName(), filterMemberDocumentation(), DocParser::findAndCopyImage(), findClassRelation(), DocParser::findDocsForMemberOrCompound(), findEnumDocumentation(), findEnums(), findFileDef(), findMember(), findScopeFromQualifiedName(), findUsingDeclImports(), generateClassOrGlobalLink(), generateClassOrGlobalLink(), generateFunctionLink(), generateFunctionLink(), generateMemberLink(), CitationManager::generatePage(), PerlModGenerator::generatePerlModForMember(), getCanonicalTemplateSpec(), getDefsOld(), getNextChar(), getParserForFile(), getScopeDefs(), handleToc(), insertTemplateSpecifierInScope(), isConstraintFile(), linkToText(), matchArgument2(), mergeArguments(), mergeScopes(), SymbolResolver::Private::newResolveTypedef(), VHDLOutlineParser::oneLineComment(), PerlModDocVisitor::operator()(), RTFDocVisitor::operator()(), DocLink::parse(), parseFile(), parseFuncDecl(), MarkdownOutlineParser::parseInput(), readTagFile(), resolveRef(), resolveTypeDef(), rightScopeMatch(), MemberList::setAnonymousEnumType(), setCallContextForVar(), setClassScope(), showFileDefMatches(), ManGenerator::startDoxyAnchor(), stripAnonymousNamespaceScope(), stripExtensionGeneral(), stripFromPath(), stripIrrelevantString(), stripKnownExtensions(), stripScope(), stripTemplateSpecifiersFromScope(), stripWord(), subrHandleCommentBlock(), substEnvVarsInStrList(), tempArgListToString(), trimBaseClassScope(), MemberDefImpl::writeDeclaration(), FileDefImpl::writeDetailedDescription(), MemberDefImpl::writeEnumDeclaration(), HtmlGenerator::writeExternalSearchPage(), HtmlHelpIndex::writeFields(), ClassDefImpl::writeIncludeFilesForSlice(), writeMscGraphFromFile(), PlantumlManager::writePlantUMLSource(), DefinitionImpl::writeSourceDef(), and DotNode::writeUrl().

◆ setNum() [1/8]

QCString & QCString::setNum ( int n)
inline

Definition at line 456 of file qcstring.h.

457 {
458 m_rep = std::to_string(n);
459 return *this;
460 }

References m_rep, and QCString().

◆ setNum() [2/8]

QCString & QCString::setNum ( long long n)
inline

Definition at line 474 of file qcstring.h.

475 {
476 m_rep = std::to_string(n);
477 return *this;
478 }

References m_rep, and QCString().

◆ setNum() [3/8]

QCString & QCString::setNum ( long n)
inline

Definition at line 468 of file qcstring.h.

469 {
470 m_rep = std::to_string(n);
471 return *this;
472 }

References m_rep, and QCString().

◆ setNum() [4/8]

◆ setNum() [5/8]

QCString & QCString::setNum ( uint16_t n)
inline

Definition at line 450 of file qcstring.h.

451 {
452 m_rep = std::to_string(n);
453 return *this;
454 }

References m_rep, and QCString().

◆ setNum() [6/8]

QCString & QCString::setNum ( uint32_t n)
inline

Definition at line 462 of file qcstring.h.

463 {
464 m_rep = std::to_string(n);
465 return *this;
466 }

References m_rep, and QCString().

◆ setNum() [7/8]

QCString & QCString::setNum ( unsigned long long n)
inline

Definition at line 480 of file qcstring.h.

481 {
482 m_rep = std::to_string(n);
483 return *this;
484 }

References m_rep, and QCString().

◆ setNum() [8/8]

QCString & QCString::setNum ( unsigned long n)
inline

Definition at line 486 of file qcstring.h.

487 {
488 m_rep = std::to_string(n);
489 return *this;
490 }

References m_rep, and QCString().

◆ simplifyWhiteSpace()

QCString QCString::simplifyWhiteSpace ( ) const

return a copy of this string with leading and trailing whitespace removed and multiple whitespace characters replaced by a single space

Definition at line 185 of file qcstring.cpp.

186{
187 if ( isEmpty() ) // nothing to do
188 return *this;
189
190 QCString result( length(), ExplicitSize );
191 const char *from = data();
192 char *to = result.rawData();
193 char *first = to;
194 while ( TRUE )
195 {
196 while ( *from && qisspace(*from) )
197 from++;
198 while ( *from && !qisspace(*from) )
199 *to++ = *from++;
200 if ( *from )
201 *to++ = 0x20; // ' '
202 else
203 break;
204 }
205 if ( to > first && *(to-1) == 0x20 )
206 to--;
207 *to = '\0';
208 result.resize( static_cast<int>(to - result.data()) );
209 return result;
210}
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
#define TRUE
Definition qcstring.h:37

References data(), ExplicitSize, isEmpty(), length(), QCString(), qisspace(), rawData(), resize(), and TRUE.

Referenced by DefinitionImpl::_docsAlreadyAdded(), addVariable(), VHDLOutlineParser::checkInlineCode(), findAndRemoveWord(), Markdown::Private::processLink(), setClassScope(), substituteTemplateArgumentsInString(), and FlowChart::writeFlowLinks().

◆ size()

size_t QCString::size ( ) const
inline

◆ sprintf()

QCString & QCString::sprintf ( const char * format,
... )

Definition at line 29 of file qcstring.cpp.

30{
31 va_list ap;
32 va_start( ap, format );
33 const size_t minlen=256;
34 size_t l = length();
35 if (l<minlen) { resize(minlen+1); l=minlen; }
36 int n=vsnprintf( rawData(), l+1, format, ap);
37 if (n<0) n=static_cast<int>(l);
38 resize(n);
39 va_end( ap );
40 return *this;
41}
char * rawData()
Returns a writable pointer to the data.
Definition qcstring.h:165
void resize(size_t newlen)
Definition qcstring.h:167

References length(), QCString(), rawData(), and resize().

Referenced by addDependencies(), addFormula(), addIncludeFile(), addXRefItem(), buildFileList(), DocParser::checkArgumentName(), clearSubDirs(), convertCppComments(), convertNameToFile(), FormulaManager::createLatexFile(), createSubDirs(), dateTimeFromString(), dateToRTFDateString(), encodeForOutput(), escapeComment(), escapeName(), escapeObject(), escapeWord(), DocParser::findAndCopyImage(), generateClassMemberLink(), generateClassOrGlobalLink(), generateFormula(), DotGfxHierarchyTable::getBaseName(), getLinkInScope(), includeTagFileAttributes(), FormulaManager::initFromRepository(), initPredefined(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), Preprocessor::processFile(), readIncludeFile(), replaceFunctionMacro(), runPlantumlContent(), saveObjCContext(), startCodeLine(), startCodeLine(), startCodeLine(), startCodeLine(), startCodeLine(), startCodeLine(), startCodeLine(), LayoutParser::startNavEntry(), RTFGenerator::startSection(), RTFGenerator::startTitleHead(), TranslatorArmenian::trDateTime(), TranslatorBrazilian::trDateTime(), TranslatorBulgarian::trDateTime(), TranslatorCatalan::trDateTime(), TranslatorChinese::trDateTime(), TranslatorChinesetraditional::trDateTime(), TranslatorCroatian::trDateTime(), TranslatorCzech::trDateTime(), TranslatorDanish::trDateTime(), TranslatorDutch::trDateTime(), TranslatorEnglish::trDateTime(), TranslatorEsperanto::trDateTime(), TranslatorFrench::trDateTime(), TranslatorGerman::trDateTime(), TranslatorGreek::trDateTime(), TranslatorHindi::trDateTime(), TranslatorHungarian::trDateTime(), TranslatorIndonesian::trDateTime(), TranslatorItalian::trDateTime(), TranslatorJapanese::trDateTime(), TranslatorKorean::trDateTime(), TranslatorLatvian::trDateTime(), TranslatorPersian::trDateTime(), TranslatorPolish::trDateTime(), TranslatorPortuguese::trDateTime(), TranslatorRomanian::trDateTime(), TranslatorRussian::trDateTime(), TranslatorSlovak::trDateTime(), TranslatorSpanish::trDateTime(), TranslatorSwedish::trDateTime(), TranslatorTurkish::trDateTime(), TranslatorUkrainian::trDateTime(), TranslatorJapanese::trWriteList(), writeDiaGraphFromFile(), ClassDiagram::writeFigure(), writeJavaScriptSearchIndex(), DocbookCodeGenerator::writeLineNumber(), LatexCodeGenerator::writeLineNumber(), RTFCodeGenerator::writeLineNumber(), writeMscGraphFromFile(), Markdown::Private::writeOneLineHeaderOrRuler(), and DefinitionImpl::writeSourceDef().

◆ startsWith() [1/2]

◆ startsWith() [2/2]

bool QCString::startsWith ( const QCString & s) const
inline

Definition at line 498 of file qcstring.h.

499 {
500 if (m_rep.empty() || s.isEmpty()) return s.isEmpty();
501 return m_rep.rfind(s.str(),0)==0; // looking "backward" starting and ending at index 0
502 }

References isEmpty(), m_rep, QCString(), and str().

◆ str()

const std::string & QCString::str ( ) const
inline

Definition at line 526 of file qcstring.h.

527 {
528 return m_rep;
529 }

References m_rep.

Referenced by DefinitionImpl::_setBriefDescription(), MemberDefImpl::_writeReimplementedBy(), DefinitionImpl::_writeSourceRefList(), SymbolResolver::Private::accessibleViaUsingNamespace(), LinkedMap< T, Hash, KeyEqual, Map >::add(), LinkedMap< T, Hash, KeyEqual, Map >::add(), LinkedRefMap< T, Hash, KeyEqual, Map >::add(), SymbolMap< T >::add(), ConstraintClassDef::addAccessor(), UsesClassDef::addAccessor(), VhdlDocGen::addBaseClass(), DotClassGraph::addClass(), Index::addClassMemberNameToIndex(), Crawlmap::addContentsItem(), addDefine(), ModuleManager::addDocs(), ModuleDefImpl::addExportedModule(), Index::addFileMemberNameToIndex(), addFormula(), DotGfxHierarchyTable::addHierarchy(), HtmlHelp::addImageFile(), ModuleManager::addImport(), FileDefImpl::addIncludedByDependency(), FileDefImpl::addIncludeDependency(), Crawlmap::addIndexFile(), HtmlHelp::addIndexFile(), Crawlmap::addIndexItem(), DocSets::addIndexItem(), HtmlHelpIndex::addItem(), addLocalVar(), Index::addModuleMemberNameToIndex(), Index::addNamespaceMemberNameToIndex(), ModuleDefImpl::addPartition(), VHDLOutlineParser::addProto(), Preprocessor::addSearchDir(), DefinitionImpl::addSourceReferencedBy(), DefinitionImpl::addSourceReferences(), HtmlHelp::addStyleSheetFile(), addUsingDirective(), addVariable(), VariableContext::addVariable(), addVariableToFile(), VHDLOutlineParser::addVhdlType(), SearchIndex::addWordRec(), FlowChart::alignCommentNode(), DotCallGraph::buildGraph(), DotInclDepGraph::buildGraph(), buildListOfUsingDecls(), Config::checkAndCorrect(), checkAndOpenFile(), DocParser::checkArgumentName(), VHDLOutlineParser::checkInlineCode(), DocParser::checkRetvalName(), DocParser::checkUnOrMultipleDocumentedParams(), checkVhdlString(), DocbookGenerator::cleanup(), HtmlGenerator::cleanup(), LatexGenerator::cleanup(), ManGenerator::cleanup(), RTFGenerator::cleanup(), clearSubDirs(), computeExpression(), computeTemplateClassRelations(), computeVerifiedDotPath(), contains(), containsEnvVar(), containsWord(), convertNameToFile(), copyFile(), copyIcon(), copyLogo(), copyStyleSheet(), DotManager::createFilePatcher(), FormulaManager::createFormulasTexFile(), VHDLOutlineParser::createFunction(), createJavaScriptSearchIndex(), FormulaManager::createLatexFile(), ModuleManager::createModuleDef(), Translator::createNoun(), createOutputDirectory(), DotManager::createRunner(), createSubDirs(), dateTimeFromString(), LinkedMap< T, Hash, KeyEqual, Map >::del(), LinkedRefMap< T, Hash, KeyEqual, Map >::del(), deliverablesPresent(), determineAbsoluteIncludeName(), determineInkscapeVersion(), MemberDefImpl::displayDefinition(), DotCallGraph::DotCallGraph(), DotClassGraph::DotClassGraph(), DotGroupCollaboration::DotGroupCollaboration(), DotInclDepGraph::DotInclDepGraph(), drawClusterOpening(), drawDirectory(), anonymous_namespace{tagreader.cpp}::TagFileParser::endElement(), endScope(), endsWith(), CondParser::evalVariable(), ExistsOnPath(), expandExpression(), externalRef(), DefinitionImpl::externalReference(), extractCanonicalType(), extractClassNameFromType(), extractDirection(), Markdown::extractPageTitle(), Markdown::Private::extractTitleId(), fileToString(), fillColorStyleMap(), filterMemberDocumentation(), filterTitle(), CitationManager::find(), LinkedMap< T, Hash, KeyEqual, Map >::find(), LinkedRefMap< T, Hash, KeyEqual, Map >::find(), find(), find(), SectionRefs::find(), SymbolMap< T >::find(), DocParser::findAndCopyImage(), findAndRemoveWord(), VhdlDocGen::findArchitecture(), findBaseClassesForClass(), findClassEntries(), findClassRelation(), findFileDef(), findFilePath(), VhdlDocGen::findKeyWord(), VhdlDocGen::findMemberDef(), findPackageScope(), findPackageScopeFromPath(), findRev(), findTemplateInstanceRelation(), findUsedClassesForClass(), VariableContext::findVariable(), fmt::formatter< QCString >::format(), generateDEF(), generateFileSources(), generateFormula(), generateFunctionLink(), generateFunctionLink(), FormulaManager::generateImages(), generateOutput(), CitationManager::generatePage(), generateXML(), genericPatternMatch(), ConfigImpl::get(), ResourceMgr::get(), MemberDefImpl::getClassDefOfAnonymousType(), DocVisitor::getCodeParser(), getConvertLatexMacro(), Portable::getenv(), FilterCache::getFileContentsDisk(), FilterCache::getFileContentsPipe(), getFilteredImageAttributes(), getFilterFromList(), getFortranDefs(), VhdlDocGen::getIndexWord(), getLanguageFromFileName(), getLinkInScope(), getMscImageMapFromFile(), ModuleManager::getPrimaryInterface(), getResolvedNamespace(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedTypeRec(), RTFDocVisitor::getStyle(), guessSection(), DocPara::handleCommand(), DocPara::handleDoxyConfig(), handleFileInfoResult(), HtmlGenerator::init(), LatexGenerator::init(), ManGenerator::init(), RTFGenerator::init(), FormulaManager::initFromRepository(), initPredefined(), initTracing(), initUCF(), CitationManager::insert(), insert(), CitationManager::insertCrossReferencesForBibFile(), insertDimension(), insertMapFile(), SymbolResolver::Private::isAccessibleFromWithExpScope(), isDefined(), isExplicitPage(), isURL(), isVarWithConstructor(), keyWordsFortranC(), labelToEnumValue(), CitationManager::latexBibFiles(), loadExtensions(), Htags::loadFilemap(), loadStylesheet(), Mapper< T >::map(), markdownFileNameToId(), matchExcludedSymbols(), HtmlEntityMapper::name2sym(), SymbolResolver::Private::newResolveTypedef(), normalizeNonTemplateArgumentsInString(), openDbConnection(), Portable::openInputStream(), openOutputFile(), Portable::openOutputStream(), operator!=(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), operator+(), operator+=(), operator<<(), TextStream::operator<<(), operator=(), operator==(), outputString(), CodeFragmentManager::parseCodeFragment(), parseFile(), VhdlDocGen::parseForBinding(), VhdlDocGen::parseForConfig(), MarkdownOutlineParser::parseInput(), parseInput(), parseMain(), VhdlDocGen::parseUCF(), Htags::path2URL(), VhdlDocGen::prepareComment(), LinkedMap< T, Hash, KeyEqual, Map >::prepend(), LinkedRefMap< T, Hash, KeyEqual, Map >::prepend(), preProcessFile(), RTFGenerator::preProcessFileInplace(), FlowChart::printNode(), processConcatOperators(), Markdown::Private::processLink(), processList(), QCString(), QCString(), readCodeFragment(), readConfiguration(), readFileOrDirectory(), readIncludeFile(), readIncludeFile(), readInputFile(), readTagFile(), readTextFileByName(), ParserManager::registerExtension(), ParserManager::registerParser(), SymbolMap< T >::remove(), removeAnonymousScopes(), replaceAnonymousScopes(), replaceColorMarkers(), replaceFunctionMacro(), replaceNamespaceAliasesRec(), replaceVariables(), resetPDFSize(), resolveLink(), resolveModuleProcedures(), resolveSymlink(), resolveTypeBoundProcedures(), RTFGenerator::rtf_BList_DepthStyle(), RTFGenerator::rtf_CList_DepthStyle(), RTFCodeGenerator::rtf_Code_DepthStyle(), RTFGenerator::rtf_DList_DepthStyle(), RTFGenerator::rtf_EList_DepthStyle(), RTFGenerator::rtf_LCList_DepthStyle(), DotFilePatcher::run(), runPlantumlContent(), SearchIndex::setCurrentDoc(), SearchIndexExternal::setCurrentDoc(), Portable::setenv(), setFileName(), FilterCache::shrinkBuffer(), simplifyTypeForTable(), splitSearchTokens(), anonymous_namespace{tagreader.cpp}::TagFileParser::startElement(), RTFCodeGenerator::startFontClass(), RTFGenerator::startSection(), startsWith(), RTFGenerator::startTitleHead(), substEnvVarsInString(), substEnvVarsInStrList(), substitute(), substituteHtmlKeywords(), substituteLatexKeywords(), substituteTemplateArgumentsInString(), substituteTemplatesInArgList(), substituteTemplatesInString(), SymbolResolver::Private::substTypedef(), toStdString(), transcodeCharacterStringToUTF8(), transferStaticInstanceInitializers(), tryPath(), Portable::unsetenv(), updateLanguageMapping(), DotAttributes::updateValue(), writeAlphabeticalClassList(), Markdown::Private::writeBlockQuote(), MemberDefImpl::writeDeclaration(), writeDiaGraphFromFile(), DefinitionImpl::writeDocAnchorsToTagFile(), MemberDefImpl::writeDocumentation(), MemberList::writeDocumentationPage(), writeDotDirDepGraph(), writeDotGraphFromFile(), writeDotImageMapFromFile(), FlowChart::writeEdge(), ClassDiagram::writeFigure(), writeFileIndex(), VhdlDocGen::writeFormatString(), writeFuncProto(), DotGfxHierarchyTable::writeGraph(), DotGraph::writeGraph(), ClassDefImpl::writeInheritanceGraph(), VhdlDocGen::writeInlineClassLink(), DotNode::writeLabel(), TextGeneratorSqlite3Impl::writeLink(), ClassDefImpl::writeMemberList(), VhdlDocGen::writePlainVHDLDeclarations(), PlantumlManager::writePlantUMLSource(), VhdlDocGen::writeRecUnitDocu(), FlowChart::writeShape(), HtmlGenerator::writeStyleInfo(), and writeWord().

◆ stripLeadingAndTrailingEmptyLines()

QCString QCString::stripLeadingAndTrailingEmptyLines ( ) const

Definition at line 573 of file qcstring.cpp.

574{
575 if (isEmpty()) return QCString();
576 const std::string &s = m_rep;
577 int end=static_cast<int>(s.length());
578 int start=0,p=0;
579 // skip leading empty lines
580 for (;;)
581 {
582 int c;
583 while ((c=s[p]) && (c==' ' || c=='\t')) p++;
584 if (s[p]=='\n')
585 {
586 start=++p;
587 }
588 else
589 {
590 break;
591 }
592 }
593 // skip trailing empty lines
594 p=end-1;
595 if (p>=start && s.at(p)=='\n') p--;
596 while (p>=start)
597 {
598 int c;
599 while ((c=s[p]) && (c==' ' || c=='\t')) p--;
600 if (s[p]=='\n')
601 {
602 end=p+1;
603 }
604 else
605 {
606 break;
607 }
608 p--;
609 }
610 //printf("stripLeadingAndTrailingEmptyLines(%d-%d)\n",start,end);
611 return s.substr(start,end-start);
612}

References end(), isEmpty(), m_rep, and QCString().

◆ stripPrefix() [1/2]

bool QCString::stripPrefix ( const char * prefix)
inline

Definition at line 209 of file qcstring.h.

210 {
211 return stripPrefix(QCString(prefix));
212 }
constexpr auto prefix
Definition anchor.cpp:44
bool stripPrefix(const QCString &prefix)
Definition qcstring.h:198

References prefix, QCString(), and stripPrefix().

◆ stripPrefix() [2/2]

◆ stripWhiteSpace()

QCString QCString::stripWhiteSpace ( ) const
inline

returns a copy of this string with leading and trailing whitespace removed

Definition at line 245 of file qcstring.h.

246 {
247 size_t sl = m_rep.size();
248 if (sl==0 || (!qisspace(m_rep[0]) && !qisspace(m_rep[sl-1]))) return *this;
249 size_t start=0,end=sl-1;
250 while (start<sl && qisspace(m_rep[start])) start++;
251 if (start==sl) return QCString(); // only whitespace
252 while (end>start && qisspace(m_rep[end])) end--;
253 return QCString(m_rep.substr(start,1+end-start));
254 }

References end(), m_rep, QCString(), and qisspace().

Referenced by DefinitionImpl::_setBriefDescription(), MemberDefImpl::_writeEnumValues(), abbreviate(), addDefine(), DocGroup::addDocs(), addFormula(), addIncludeFile(), addKnRArgInfo(), addMacroDefinition(), addPerlModDocBlock(), addRelatedPage(), addSeparatorsIfNeeded(), addSubprogram(), ClassDefImpl::addTypeConstraints(), adjustConfiguration(), appStringLower(), buildPageList(), Config::checkAndCorrect(), DocParser::checkArgumentName(), checkFileName(), checkList(), DocParser::checkUnOrMultipleDocumentedParams(), compareString(), convertCppComments(), DotNode::convertLabel(), convertStringToBool(), convertToComment(), determineBlockName(), expandExpression(), extractBind(), extractCanonicalArgType(), extractCanonicalType(), extractFromParens(), extractNoExcept(), fillColorStyleMap(), findMainPage(), findMember(), VhdlDocGen::formatString(), generateFunctionLink(), generateFunctionLink(), generateSqlite3ForMember(), generateXMLForMember(), getCanonicalTemplateSpec(), getFilteredImageAttributes(), DocPara::handleCommand(), handleFileInfoResult(), VHDLOutlineParser::handleFlowComment(), handleGuard(), DocParser::handleImage(), handleImage(), DocPara::handleInclude(), handleInheritanceGraph(), DocPara::handleShowDate(), handleToc(), initUCF(), CitationManager::insertCrossReferencesForBibFile(), isCastKeyword(), ClassDefImpl::isExtension(), isURL(), Htags::loadFilemap(), mergeArguments(), parseCommentAsText(), VhdlDocGen::parseFuncProto(), MarkdownOutlineParser::parseInput(), VhdlDocGen::parseUCF(), VhdlDocGen::prepareComment(), FlowChart::printNode(), FlowChart::printPlantUmlNode(), Markdown::Private::processLink(), processStoreRepl(), projectLogoSize(), readIncludeFile(), readIncludeFile(), readTagFile(), replaceFunctionMacro(), SymbolResolver::resolveClass(), splitKnRArg(), startOfRequiresExpression(), stripComment(), stripIrrelevantString(), stripTrailingReturn(), subrHandleCommentBlock(), subrHandleCommentBlockResult(), substEnvVarsInString(), substituteTemplateArgumentsInString(), Portable::system(), LayoutNavEntry::url(), MemberDefImpl::writeDeclaration(), MemberList::writeDeclarations(), writeExceptionList(), HtmlGenerator::writeExternalSearchPage(), VhdlDocGen::writeFunctionProto(), writeObjCMethodCall(), VhdlDocGen::writeVHDLTypeDocumentation(), and writeXMLDocBlock().

◆ toInt()

int QCString::toInt ( bool * ok = nullptr,
int base = 10 ) const

Definition at line 249 of file qcstring.cpp.

250{
251 return static_cast<int>(toLong( ok, base ));
252}
long toLong(bool *ok=nullptr, int base=10) const
Definition qcstring.cpp:260

References toLong().

Referenced by VhdlDocGen::addBaseClass(), insertDimension(), runQHelpGenerator(), TranslatorSlovak::trAndMore(), and writeObjCMethodCall().

◆ toLong()

long QCString::toLong ( bool * ok = nullptr,
int base = 10 ) const

Definition at line 260 of file qcstring.cpp.

261{
262 const char *p = data();
263 long val=0;
264 int l = static_cast<int>(length());
265 const long max_mult = INT_MAX / base;
266 bool is_ok = FALSE;
267 int neg = 0;
268 if ( !p )
269 goto bye;
270 while ( l && qisspace(*p) ) // skip leading space
271 l--,p++;
272 if ( l && *p == '-' ) {
273 l--;
274 p++;
275 neg = 1;
276 } else if ( *p == '+' ) {
277 l--;
278 p++;
279 }
280
281 // NOTE: toULong() code is similar
282 if ( !l || !ok_in_base(*p,base) )
283 goto bye;
284 while ( l && ok_in_base(*p,base) ) {
285 l--;
286 int dv = 0;
287 if ( *p>='0' && *p<='9' ) {
288 dv = *p-'0';
289 } else {
290 if ( *p >= 'a' && *p <= 'z' )
291 dv = *p - 'a' + 10;
292 else
293 dv = *p - 'A' + 10;
294 }
295 if ( val > max_mult || (val == max_mult && dv > (INT_MAX%base)+neg) )
296 goto bye;
297 val = base*val + dv;
298 p++;
299 }
300 if ( neg )
301 val = -val;
302 while ( l && qisspace(*p) ) // skip trailing space
303 l--,p++;
304 if ( !l )
305 is_ok = TRUE;
306bye:
307 if ( ok )
308 *ok = is_ok;
309 return is_ok ? val : 0;
310}
static bool ok_in_base(char c, int base)
Definition qcstring.cpp:219

References data(), FALSE, length(), ok_in_base(), qisspace(), and TRUE.

Referenced by toInt(), and toShort().

◆ toShort()

short QCString::toShort ( bool * ok = nullptr,
int base = 10 ) const

Definition at line 229 of file qcstring.cpp.

230{
231 long v = toLong( ok, base );
232 if ( ok && *ok && (v < -32768 || v > 32767) ) {
233 *ok = FALSE;
234 v = 0;
235 }
236 return static_cast<short>(v);
237}

References FALSE, and toLong().

◆ toUInt()

uint32_t QCString::toUInt ( bool * ok = nullptr,
int base = 10 ) const

Definition at line 254 of file qcstring.cpp.

255{
256 return static_cast<uint32_t>(toULong( ok, base ));
257}
unsigned long toULong(bool *ok=nullptr, int base=10) const
Definition qcstring.cpp:312

References toULong().

◆ toUInt64()

uint64_t QCString::toUInt64 ( bool * ok = nullptr,
int base = 10 ) const

Definition at line 356 of file qcstring.cpp.

357{
358 const char *p = data();
359 uint64_t val=0;
360 int l = static_cast<int>(length());
361 const uint64_t max_mult = 1844674407370955161ULL; // ULLONG_MAX/10, rounded down
362 bool is_ok = FALSE;
363 if ( !p )
364 goto bye;
365 while ( l && qisspace(*p) ) // skip leading space
366 l--,p++;
367 if ( *p == '+' )
368 l--,p++;
369
370 // NOTE: toULong() code is similar
371 if ( !l || !ok_in_base(*p,base) )
372 goto bye;
373 while ( l && ok_in_base(*p,base) ) {
374 l--;
375 uint32_t dv = 0;
376 if ( *p>='0' && *p<='9' ) {
377 dv = *p-'0';
378 } else {
379 if ( *p >= 'a' && *p <= 'z' )
380 dv = *p - 'a' + 10;
381 else
382 dv = *p - 'A' + 10;
383 }
384 if ( val > max_mult || (val == max_mult && dv > (ULLONG_MAX%base)) )
385 goto bye;
386 val = base*val + dv;
387 p++;
388 }
389
390 while ( l && qisspace(*p) ) // skip trailing space
391 l--,p++;
392 if ( !l )
393 is_ok = TRUE;
394bye:
395 if ( ok )
396 *ok = is_ok;
397 return is_ok ? val : 0;
398}

References data(), FALSE, length(), ok_in_base(), qisspace(), and TRUE.

Referenced by getCurrentDateTime().

◆ toULong()

unsigned long QCString::toULong ( bool * ok = nullptr,
int base = 10 ) const

Definition at line 312 of file qcstring.cpp.

313{
314 const char *p = data();
315 unsigned long val=0;
316 int l = static_cast<int>(length());
317 const unsigned long max_mult = 429496729; // UINT_MAX/10, rounded down
318 bool is_ok = FALSE;
319 if ( !p )
320 goto bye;
321 while ( l && qisspace(*p) ) // skip leading space
322 l--,p++;
323 if ( *p == '+' )
324 l--,p++;
325
326 // NOTE: toLong() code is similar
327 if ( !l || !ok_in_base(*p,base) )
328 goto bye;
329 while ( l && ok_in_base(*p,base) ) {
330 l--;
331 uint32_t dv = 0;
332 if ( *p>='0' && *p<='9' ) {
333 dv = *p-'0';
334 } else {
335 if ( *p >= 'a' && *p <= 'z' )
336 dv = *p - 'a' + 10;
337 else
338 dv = *p - 'A' + 10;
339 }
340 if ( val > max_mult || (val == max_mult && dv > (UINT_MAX%base)) )
341 goto bye;
342 val = base*val + dv;
343 p++;
344 }
345
346 while ( l && qisspace(*p) ) // skip trailing space
347 l--,p++;
348 if ( !l )
349 is_ok = TRUE;
350bye:
351 if ( ok )
352 *ok = is_ok;
353 return is_ok ? val : 0;
354}

References data(), FALSE, length(), ok_in_base(), qisspace(), and TRUE.

Referenced by toUInt(), and toUShort().

◆ toUShort()

uint16_t QCString::toUShort ( bool * ok = nullptr,
int base = 10 ) const

Definition at line 239 of file qcstring.cpp.

240{
241 unsigned long v = toULong( ok, base );
242 if ( ok && *ok && (v > 65535) ) {
243 *ok = FALSE;
244 v = 0;
245 }
246 return static_cast<uint16_t>(v);
247}

References FALSE, and toULong().

◆ upper()

QCString QCString::upper ( ) const
inline

Definition at line 239 of file qcstring.h.

240 {
242 }
std::string convertUTF8ToUpper(const std::string &input)
Converts the input string into a upper case version, also taking into account non-ASCII characters th...
Definition utf8.cpp:192

References convertUTF8ToUpper(), m_rep, and QCString().

Referenced by VhdlDocGen::findMember(), TranslatorAfrikaans::trDayOfWeek(), TranslatorBrazilian::trDayOfWeek(), TranslatorCatalan::trDayOfWeek(), TranslatorCzech::trDayOfWeek(), TranslatorDanish::trDayOfWeek(), TranslatorDutch::trDayOfWeek(), TranslatorEsperanto::trDayOfWeek(), TranslatorFinnish::trDayOfWeek(), TranslatorFrench::trDayOfWeek(), TranslatorHungarian::trDayOfWeek(), TranslatorItalian::trDayOfWeek(), TranslatorLatvian::trDayOfWeek(), TranslatorLithuanian::trDayOfWeek(), TranslatorNorwegian::trDayOfWeek(), TranslatorPolish::trDayOfWeek(), TranslatorPortuguese::trDayOfWeek(), TranslatorRomanian::trDayOfWeek(), TranslatorSerbian::trDayOfWeek(), TranslatorSlovak::trDayOfWeek(), TranslatorSlovene::trDayOfWeek(), TranslatorSpanish::trDayOfWeek(), TranslatorSwedish::trDayOfWeek(), TranslatorAfrikaans::trMonth(), TranslatorBrazilian::trMonth(), TranslatorCatalan::trMonth(), TranslatorCzech::trMonth(), TranslatorDanish::trMonth(), TranslatorDutch::trMonth(), TranslatorEsperanto::trMonth(), TranslatorFinnish::trMonth(), TranslatorFrench::trMonth(), TranslatorHungarian::trMonth(), TranslatorItalian::trMonth(), TranslatorLatvian::trMonth(), TranslatorLithuanian::trMonth(), TranslatorNorwegian::trMonth(), TranslatorPolish::trMonth(), TranslatorPortuguese::trMonth(), TranslatorRomanian::trMonth(), TranslatorSerbian::trMonth(), TranslatorSlovak::trMonth(), TranslatorSlovene::trMonth(), TranslatorSpanish::trMonth(), and TranslatorSwedish::trMonth().

◆ view()

std::string_view QCString::view ( ) const
inline

Member Data Documentation

◆ m_rep


The documentation for this class was generated from the following files: