Skip to content

Commit fcffff5

Browse files
committed
ref parser supports template arguments
#feat
1 parent 1b3227b commit fcffff5

File tree

4 files changed

+213
-128
lines changed

4 files changed

+213
-128
lines changed

include/mrdocs/Support/String.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ MRDOCS_DECL
7777
void
7878
replace(std::string& s, std::string_view from, std::string_view to);
7979

80+
/** Determine if a string is only whitespace.
81+
*/
82+
constexpr
83+
bool
84+
isWhitespace(std::string_view s) noexcept
85+
{
86+
return s.find_first_not_of(" \t\n\v\f\r") == std::string::npos;
87+
}
88+
8089

8190
} // mrdocs
8291
} // clang

0 commit comments

Comments
 (0)