Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
|
#include <CStringTools.hpp>
Static Public Member Functions | |
static char * | createCopyMemory (const void *bufferSrc, uint64_t numBytes) |
Create from an existent buffer. | |
static std::string | convertToUTF8 (std::string_view text) |
Convert the given text to UTF-8. | |
static char * | copy (const char *str) |
Create a copy of the given buffer. | |
static void | copyBuffer (const std::string &str, uint64_t sizeBuffer, char *buffer) |
static void | copyMemory (void *bufferDst, const void *bufferSrc, uint64_t numBytes) |
Copies the memory from bufferSrc to bufferDst the amount of bytes given in <numBytes> | |
static void | copyMemoryReversed (void *bufferDst, const void *bufferSrc, uint64_t numBytes) |
Copy memory from bufferSrc to bufferDst in a reverse way. | |
static void | deleteCharIntoString (char *stringBuffer, uint64_t indPos) |
Remove the character at position, next characters are displaced to left. | |
static void | insertCharIntoString (char *stringBuffer, uint64_t tamBuffer, uint64_t indPos, char charInsert) |
Insert a character into a position of a string. | |
static void | memoryInitialize (void *buffer, uint64_t numBytes, unsigned char value) |
Initialize the buffer with the given char the number of bytes given. | |
static std::string | generateRandomPasswordString (uint32_t minLength, uint32_t maxLength, bool lowerTypes, bool upperTypes, bool numTypes) |
Genera un string aleatorio con el tamaño comprendido entre el min y max con mínimo un caracter de cada uno que se solicita. | |
static std::vector< std::string > | split (const std::string &str, std::string_view separator) |
Splits the given string into an array of substrings separated by the separator given. | |
static std::vector< std::string > | splitByLength (const std::string &str, uint64_t maxLength) |
Splits a given message into smaller sizes messages to fit in a maximum length. | |
static std::string | strDate (uint16_t day, uint16_t month, uint16_t year) |
Returns a formatted string of the date. | |
static std::string | strTime (uint16_t hour, uint16_t minutes, uint16_t seconds) |
Returns a formatted string of the time. | |
static char * | initialExtractUntilChar (const char *str, char c) |
Extracts the substring from the beggining to the last instance of the given char. | |
static char * | endExtractFromChar (const char *str, char c) |
Extract the existent substring from the last occurrence of the given char. | |
static std::string | truncateWithPoints (const std::string &str, uint64_t maxLength) |
|
static |
Convert the given text to UTF-8.
text |
text | The text to convert |
|
static |
Create a copy of the given buffer.
str |
str | The buffer to copy |
|
static |
Copy a string into a buffer
str | String to copy |
sizeBuffer | Size of buffer |
buffer | Buffer which will contain given string (output parameter) |
|
static |
Copies the memory from bufferSrc
to bufferDst
the amount of bytes given in <numBytes>
bufferDst | The buffer where copy the data |
bufferSrc | The buffer whence get the data |
numBytes | The number of bytes to copy |
|
static |
Copy memory from bufferSrc
to bufferDst
in a reverse way.
bufferDst | The buffer where copy the data |
bufferSrc | The buffer whence get the data |
numBytes | The number of bytes to copy |
|
static |
Create from an existent buffer.
bufferSrc | |
numBytes |
bufferSrc | The buffer whence get the data to copy |
numBytes | The amount of bytes to copy |
|
static |
Remove the character at position, next characters are displaced to left.
stringBuffer | String base where the character is |
indPos | Position of Character to remove |
|
static |
Extract the existent substring from the last occurrence of the given char.
str | The string whence extract the substring |
c | The char to look for the last occurrence |
|
static |
Genera un string aleatorio con el tamaño comprendido entre el min y max con mínimo un caracter de cada uno que se solicita.
minLength | Tamaño minimo del string generado. |
maxLength | Tamaño máximo del string generado. |
lowerTypes | Si se requiere al menos un caracter en minúsculas. |
upperTypes | Si se requiere al menos un caracter en mayúsculas. |
numTypes | Si se requiere al menos un caracter numérico. |
|
static |
Extracts the substring from the beggining to the last instance of the given char.
str | The buffer whence get the substring |
c | The char to limitate the substring |
|
static |
Insert a character into a position of a string.
stringBuffer | string where to insert |
tamBuffer | max size of the string |
indPos | position to insert |
charInsert | character to insert |
|
static |
Initialize the buffer with the given char the number of bytes given.
buffer | The buffer which initialize |
numBytes | The number of bytes to initialize |
value | The value to initialize the buffer with |
|
static |
Splits the given string into an array of substrings separated by the separator given.
str | The string to split |
separator | The separator of the substrings |
|
static |
Splits a given message into smaller sizes messages to fit in a maximum length.
str | The string to split. |
maxLength | The max size of each split bit. |
|
static |
Returns a formatted string of the date.
day | The day |
month | The month |
year | The year |
|
static |
Returns a formatted string of the time.
hour | The hour |
minutes | The minutes |
seconds | The seconds |
|
static |
str | |
maxLength |