This class contains helper functions for string related tasks.
More...
#include <jbwoprhelpers.h>
|
static std::string | getCenteredString (const std::string str, const uint32_t length, char padChar=' ') |
| Get centered string.
|
|
static std::string | getRightAlignedString (std::string str, uint32_t length, char padChar=' ') |
| Get right aligned string.
|
|
static std::string | rgbToString (uint32_t rgbValue) |
| Get hex coded color string.
|
|
static uint32_t | stringToRgb (std::string rgbString) |
| Get RGB value from hex coded color string.
|
|
This class contains helper functions for string related tasks.
◆ getCenteredString()
std::string JBStringHelper::getCenteredString |
( |
const std::string |
str, |
|
|
const uint32_t |
length, |
|
|
char |
padChar = ' ' |
|
) |
| |
|
static |
Get centered string.
- Parameters
-
str | String to center |
length | Length of centered string |
padChar | Character to pad with, default is space |
◆ getRightAlignedString()
std::string JBStringHelper::getRightAlignedString |
( |
std::string |
str, |
|
|
uint32_t |
length, |
|
|
char |
padChar = ' ' |
|
) |
| |
|
static |
Get right aligned string.
- Parameters
-
str | String to right align |
length | Length of right aligned string |
padChar | Character to pad with, default is space |
◆ rgbToString()
std::string JBStringHelper::rgbToString |
( |
uint32_t |
rgbValue | ) |
|
|
static |
Get hex coded color string.
- Parameters
-
- Returns
- Hex coded color string
◆ stringToRgb()
uint32_t JBStringHelper::stringToRgb |
( |
std::string |
rgbString | ) |
|
|
static |
Get RGB value from hex coded color string.
- Parameters
-
rgbString | Hex coded color string |
- Returns
- RGB value
The documentation for this class was generated from the following files: