Skip to main content

blokdots::string

String manipulation helpers including {{value}} template substitution and percent-encoding.

C++
#include "blokdots.h"

#Functions

#hexNibble

C++
uint8_t hexNibble(char c);

#decodePercentInPlace

C++
void decodePercentInPlace(char s);

#decodePercentTo

C++
void decodePercentTo(const char src, char dst, size_t dstSize);

#mapUtf8PairToSingleByte

C++
uint8_t mapUtf8PairToSingleByte(uint8_t a, uint8_t b);

#sanitizeUtf8ToSingleByteInPlace

C++
void sanitizeUtf8ToSingleByteInPlace(char s);

#replaceFirst

C++
bool replaceFirst(char haystack, const char needle, const char replacement);

#replaceFirstTo

C++
bool replaceFirstTo(const char source, const char needle, const char replacement, char dest, size_t destSize);

#replaceValuePlaceholder

C++
bool replaceValuePlaceholder(char text, int value);

#replaceValuePlaceholder

C++
bool replaceValuePlaceholder(char text, float value, uint8_t decimals);

#replaceValuePlaceholder

C++
bool replaceValuePlaceholder(char text, bool value);

#replaceValuePlaceholder

C++
bool replaceValuePlaceholder(char text, const blokdots::Color value);

#replaceValuePlaceholder

C++
bool replaceValuePlaceholder(char text, const blokdots::String value);