The stringutil.h
File Reference
Some helper functions for std::string. More...
Included Headers
Functions Index
void | substituteInplace (std::string &s, std::string_view toReplace, std::string_view replaceWith) |
Replaces occurrences of substring toReplace in string s with string replaceWith. More... | |
std::string | substituteStringView (std::string_view s, std::string_view toReplace, std::string_view replaceWith) |
Returns a new string where occurrences of substring toReplace in string s are replaced by string replaceWith. More... | |
std::string_view | stripWhiteSpace (std::string_view s) |
Given a string view s, returns a new, narrower view on that string, skipping over any leading or trailing whitespace characters. More... | |
void | addTerminalCharIfMissing (std::string &s, char c) |
template <size_t N> | |
bool | literal_at (const char *data, const char(&str)[N]) |
returns TRUE iff data points to a substring that matches string literal str More... | |
template <size_t N> | |
bool | literal_at (std::string_view data, const char(&str)[N]) |
returns TRUE iff data points to a substring that matches string literal str More... | |
Description
Some helper functions for std::string.
Functions
addTerminalCharIfMissing()
| inline |
Definition at line 84 of file stringutil.h.
Referenced by checkAndOpenFile, fileToString, parseFile and parseInput.
literal_at()
|
returns TRUE iff data points to a substring that matches string literal str
Definition at line 98 of file stringutil.h.
Reference qstrncmp.
Referenced by computeIndent, convertMapFile, detab, extractCopyDocId, getConvertLatexMacro, isExplicitPage, isNewline, Markdown::Private::isSpecialCommand, Markdown::process, Markdown::Private::processNmdash, readSVGSize, removeIdsAndMarkers, skipOverFileAndLineCommands, stripIndentation, stripLeadingAndTrailingEmptyLines, stripTrailingWhiteSpace and PlantumlManager::writePlantUMLSource.
literal_at()
|
returns TRUE iff data points to a substring that matches string literal str
Definition at line 106 of file stringutil.h.
Reference qstrncmp.
stripWhiteSpace()
| inline |
Given a string view s, returns a new, narrower view on that string, skipping over any leading or trailing whitespace characters.
Definition at line 72 of file stringutil.h.
Reference end.
Referenced by DefinitionImpl::_setDocumentation, addValidAliasToMap, endBrief, VhdlDocGen::getClass, handleInheritanceGraph, handleToc, FileDefImpl::hasDetailedDescription, DefinitionImpl::operator=, parseIncludeOptions, DefinitionImpl::setDocumentation, DefinitionMixin< Base >::setDocumentation, DefinitionMutable::setDocumentation, MemberDefImpl::setDocumentation, toDefinition, Markdown::Private::writeBlockQuote and FileDefImpl::writeBriefDescription.
substituteInplace()
| inline |
Replaces occurrences of substring toReplace in string s with string replaceWith.
Modifies s in place.
Definition at line 29 of file stringutil.h.
Referenced by replaceAliasArguments.
substituteStringView()
| inline |
Returns a new string where occurrences of substring toReplace in string s are replaced by string replaceWith.
Definition at line 50 of file stringutil.h.
Referenced by escapeAlias and replaceAliases.
Generated via doxygen2docusaurus by Doxygen 1.14.0.