aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbutl/utility.hxx2
-rw-r--r--libbutl/utility.ixx12
2 files changed, 14 insertions, 0 deletions
diff --git a/libbutl/utility.hxx b/libbutl/utility.hxx
index 95a7f78..e284fa6 100644
--- a/libbutl/utility.hxx
+++ b/libbutl/utility.hxx
@@ -132,11 +132,13 @@ namespace butl
bool digit (char);
bool alnum (char);
bool xdigit (char);
+ bool wspace (char);
bool alpha (wchar_t);
bool digit (wchar_t);
bool alnum (wchar_t);
bool xdigit (wchar_t);
+ bool wspace (wchar_t);
// Basic string utilities.
//
diff --git a/libbutl/utility.ixx b/libbutl/utility.ixx
index 4180ad7..45bbf9d 100644
--- a/libbutl/utility.ixx
+++ b/libbutl/utility.ixx
@@ -143,6 +143,12 @@ namespace butl
}
inline bool
+ wspace (char c)
+ {
+ return std::isspace (c);
+ }
+
+ inline bool
alpha (wchar_t c)
{
return std::iswalpha (c);
@@ -166,6 +172,12 @@ namespace butl
return std::iswxdigit (c);
}
+ inline bool
+ wspace (wchar_t c)
+ {
+ return std::iswspace (c);
+ }
+
inline std::size_t
next_word (const std::string& s, std::size_t& b, std::size_t& e,
char d1, char d2)