summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/utils.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/utils.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/utils.hh17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/utils.hh b/src/bin/eolian_mono/eolian/mono/utils.hh
index 9e583df..d942903 100644
--- a/src/bin/eolian_mono/eolian/mono/utils.hh
+++ b/src/bin/eolian_mono/eolian/mono/utils.hh
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#ifndef EOLIAN_MONO_UTILS_HPP 16#ifndef EOLIAN_MONO_UTILS_HPP
2#define EOLIAN_MONO_UTILS_HPP 17#define EOLIAN_MONO_UTILS_HPP
3 18
@@ -83,7 +98,7 @@ namespace eolian_mono { namespace utils {
83 98
84 inline bool ends_with(std::string const& source, std::string suffix) 99 inline bool ends_with(std::string const& source, std::string suffix)
85 { 100 {
86 if (source.size() > suffix.size()) 101 if (source.size() >= suffix.size())
87 return (0 == source.compare(source.size() - suffix.size(), suffix.size(), suffix)); 102 return (0 == source.compare(source.size() - suffix.size(), suffix.size(), suffix));
88 else 103 else
89 return false; 104 return false;