aboutsummaryrefslogtreecommitdiff
path: root/bdep/utility.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-01-28 20:44:28 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-01-29 16:27:48 +0300
commita431fe8a8dfbbe121a30c66df0424be6351ae9ff (patch)
treea608ce67f1677ea318481f0e31f0a1031b4fc223 /bdep/utility.hxx
parentf93e1e81eac9bcce3d11379e4cdefed5cf6093fd (diff)
Validate that values submitted to CI and submission services contain UTF-8 encoded graphic characters only
Diffstat (limited to 'bdep/utility.hxx')
-rw-r--r--bdep/utility.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/bdep/utility.hxx b/bdep/utility.hxx
index 3de1c32..7f464ad 100644
--- a/bdep/utility.hxx
+++ b/bdep/utility.hxx
@@ -303,6 +303,15 @@ namespace bdep
scan_arguments (r, s);
return r;
}
+
+ // Verify that a string is a valid UTF-8 byte sequence encoding only the
+ // graphic Unicode codepoints. Issue diagnostics (including a suggestion to
+ // use option opt, if specified) and fail if that's not the case.
+ //
+ void
+ validate_utf8_graphic (const string&,
+ const char* what,
+ const char* opt = nullptr);
}
#include <bdep/utility.txx>