projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Clean up and fix subtitle parsing a bit.
[libdcp.git]
/
src
/
util.cc
diff --git
a/src/util.cc
b/src/util.cc
index fd76e556b464d32520417ca5c664fc4ac0a929c7..913b8b507175829e90999fed8a71e374dcaced1d 100644
(file)
--- 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;
+}