Doxygen
|
Some helper functions for std::string. More...
#include <string>
#include <string_view>
Go to the source code of this file.
Functions | |
void | substituteInplace (std::string &s, std::string_view toReplace, std::string_view replaceWith) |
Replaces occurrences of substring toReplace in string s with string replaceWith. | |
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. | |
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. | |
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 | |
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 | |
Some helper functions for std::string.
Definition in file stringutil.h.
|
inline |
Definition at line 84 of file stringutil.h.
Referenced by fileToString(), parseFile(), and parseInput().
bool literal_at | ( | const char * | data, |
const char(&) | str[N] ) |
returns TRUE iff data points to a substring that matches string literal str
Definition at line 98 of file stringutil.h.
References 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().
bool literal_at | ( | std::string_view | data, |
const char(&) | str[N] ) |
returns TRUE iff data points to a substring that matches string literal str
Definition at line 106 of file stringutil.h.
References qstrncmp().
|
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.
References 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().
|
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().
|
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().