summaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util.cc b/src/util.cc
index fd76e556..913b8b50 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -252,3 +252,15 @@ libdcp::xyz_to_rgb (opj_image_t* xyz_frame)
return argb_frame;
}
+
+bool
+libdcp::empty_or_white_space (string s)
+{
+ for (size_t i = 0; i < s.length(); ++i) {
+ if (s[i] != ' ' && s[i] != '\n' && s[i] != '\t') {
+ return false;
+ }
+ }
+
+ return true;
+}