summaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-13 13:46:20 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-13 13:46:20 +0000
commit62ee85a258aa9329544d8542dfbcc40ce8177a7a (patch)
tree8579cd323c127bb3bff23c216a55cc92a7001651 /src/util.cc
parentceb30c0b2e73588daa014af57deee7255b175e4d (diff)
Use boost starts/ends with methods.
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/util.cc b/src/util.cc
index ca621a44..6769cc41 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -165,34 +165,6 @@ libdcp::content_kind_from_string (string type)
assert (false);
}
-/** @param big A string.
- * @param little A string which is the same length as, or shorter than, big.
- * @return true if `big' starts with `little'.
- */
-bool
-libdcp::starts_with (string big, string little)
-{
- if (little.size() > big.size()) {
- return false;
- }
-
- return big.substr (0, little.length()) == little;
-}
-
-/** @param big A string.
- * @param little A string which is the same length as, or shorter than, big.
- * @return true if `big' ends with `little'.
- */
-bool
-libdcp::ends_with (string big, string little)
-{
- if (little.size() > big.size()) {
- return false;
- }
-
- return big.compare (big.length() - little.length(), little.length(), little) == 0;
-}
-
/** Decompress a JPEG2000 image to a bitmap.
* @param data JPEG2000 data.
* @param size Size of data in bytes.