diff options
Diffstat (limited to 'arm_compute/core')
-rw-r--r-- | arm_compute/core/utils/misc/Utility.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arm_compute/core/utils/misc/Utility.h b/arm_compute/core/utils/misc/Utility.h index a2784a2fc0..0a9f180b4c 100644 --- a/arm_compute/core/utils/misc/Utility.h +++ b/arm_compute/core/utils/misc/Utility.h @@ -192,6 +192,21 @@ inline bool check_aligned(void *ptr, const size_t alignment) { return (reinterpret_cast<std::uintptr_t>(ptr) % alignment) == 0; } + +/** Convert string to lower case. + * + * @param[in] string To be converted string. + * + * @return Lower case string. + */ +inline std::string tolower(std::string string) +{ + std::transform(string.begin(), string.end(), string.begin(), [](unsigned char c) + { + return std::tolower(c); + }); + return string; +} } // namespace utility } // namespace arm_compute #endif /* __ARM_COMPUTE_MISC_UTILITY_H__ */ |