Scrubber Functions

Note

All classes and symbols listed here are in the ApprovalTests namespace.

Scrubbers

For more information, see Scrubbers.

namespace Scrubbers

Regex-based scrubbers

See Regular Expressions (regex) in the User Guide on GitHub.

using RegexMatch = std::sub_match<std::string::const_iterator>
using RegexReplacer = std::function<std::string(const RegexMatch&)>
std::string scrubRegex(const std::string &input, const std::regex &regex, const RegexReplacer &replaceFunction)
Scrubber createRegexScrubber(const std::regex &regexPattern, const RegexReplacer &replacer)
Scrubber createRegexScrubber(const std::regex &regexPattern, const std::string &replacementText)
Scrubber createRegexScrubber(const std::string &regexString, const std::string &replacementText)

Functions

std::string doNothing(const std::string &input)
std::string scrubGuid(const std::string &input)