File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
src/tools/fdsdump/src/common Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,13 @@ string_trim_copy(std::string str)
9999 return str;
100100}
101101
102+ std::string
103+ string_to_lower (std::string str)
104+ {
105+ std::for_each (str.begin (), str.end (), [](char &c) { c = std::tolower (c); });
106+ return str;
107+ }
108+
102109void
103110memcpy_bits (uint8_t *dst, uint8_t *src, unsigned int n_bits)
104111{
Original file line number Diff line number Diff line change @@ -61,6 +61,17 @@ string_trim(std::string &str);
6161std::string
6262string_trim_copy (std::string str);
6363
64+
65+ /* *
66+ * @brief Convert a string to lowercase
67+ *
68+ * @param The string to convert
69+ *
70+ * @return The supplied string converted to lowercase
71+ */
72+ std::string
73+ string_to_lower (std::string str);
74+
6475/* *
6576 * @brief Copy a specified number of bits from source to destination,
6677 * remaining bits in an incomplete byte are zeroed.
You can’t perform that action at this time.
0 commit comments