strip leading and trailing whitespace Plain textCopy to clipboardOpen code in new windowEnlighterJS 3 Syntax Highlighterstr = std::regex_replace(str, std::regex("^[ \t]+|[ \t]+$"), "");str = std::regex_replace(str, std::regex("^[ \t]+|[ \t]+$"), "");str = std::regex_replace(str, std::regex("^[ \t]+|[ \t]+$"), "");