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) |
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().
|
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().