* Check if a string does not contain any embedded NUL (\0) characters */
| 77 | * Check if a string does not contain any embedded NUL (\0) characters |
| 78 | */ |
| 79 | [[nodiscard]] inline bool ValidAsCString(const std::string& str) noexcept |
| 80 | { |
| 81 | return str.size() == strlen(str.c_str()); |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * Locale-independent version of std::to_string |