OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Functions
Transformations.cpp File Reference
#include "Transformations.h"
#include <cassert>
#include <string>
#include "Format.h"

Functions

std::string toHexDump (std::string_view s, size_t groupSize)
 
std::string replaceAll (std::string_view text, std::string_view what, std::string_view replacement)
 
std::string replaceAll (std::string_view text, char what, char replacement)
 

Function Documentation

◆ replaceAll() [1/2]

std::string replaceAll ( std::string_view  text,
char  what,
char  replacement 
)

◆ replaceAll() [2/2]

std::string replaceAll ( std::string_view  text,
std::string_view  what,
std::string_view  replacement 
)

◆ toHexDump()

std::string toHexDump ( std::string_view  s,
size_t  groupSize = 0 
)

toHexDump("0123", 2) is "3132 3334".

Parameters
sString to convert.
groupSizeSize of a single group, in bytes.
Returns
Hex dump of the provided string.