A collection of string-related utility functions.
More...
#include <string>
#include <vector>
Go to the source code of this file.
|
| std::vector< std::string > | satdump::splitString (std::string input, char del) |
| | Split a string into multiples where a specific char is present.
|
| void | satdump::replaceAllStr (std::string &str, const std::string &from, const std::string &to) |
| | Replaces all occurences of a string in a string with another string. (lots of strings!)
|
| bool | satdump::isStringPresent (std::string searched, std::string keyword) |
| | Check if a pattern is present in the provided string. Case-insensitive.
|
| std::string | satdump::loadFileToString (std::string path) |
| | Load a text file into a std::string.
|
| std::string | satdump::ws2s (const std::wstring &wstr) |
| | Convert a std::wstring to std::string.
|
| std::wstring | satdump::s2ws (const std::string &str) |
| | Convert a std::string to std::wstring.
|
A collection of string-related utility functions.
◆ isStringPresent()
| bool satdump::isStringPresent |
( |
std::string | searched, |
|
|
std::string | keyword ) |
Check if a pattern is present in the provided string. Case-insensitive.
- Parameters
-
| searched | string to search in |
| keyword | pattern to search |
- Returns
- true if present
◆ loadFileToString()
| std::string satdump::loadFileToString |
( |
std::string | path | ) |
|
Load a text file into a std::string.
- Parameters
-
- Returns
- loaded string
◆ replaceAllStr()
| void satdump::replaceAllStr |
( |
std::string & | str, |
|
|
const std::string & | from, |
|
|
const std::string & | to ) |
Replaces all occurences of a string in a string with another string. (lots of strings!)
- Parameters
-
| str | the string to replace in |
| from | pattern to replace |
| to | pattern to replace the old pattern with |
◆ s2ws()
| std::wstring satdump::s2ws |
( |
const std::string & | str | ) |
|
Convert a std::string to std::wstring.
- Parameters
-
- Returns
- output std::wstring
◆ splitString()
| std::vector< std::string > satdump::splitString |
( |
std::string | input, |
|
|
char | del ) |
Split a string into multiples where a specific char is present.
- Parameters
-
| input | the string to split |
| del | delimiter character |
- Returns
- string segments
◆ ws2s()
| std::string satdump::ws2s |
( |
const std::wstring & | wstr | ) |
|
Convert a std::wstring to std::string.
- Parameters
-
- Returns
- output std::string