Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
2ad14ef4
Commit
2ad14ef4
authored
Feb 13, 2019
by
Brad King
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmAlgorithms: Add cmHasPrefix to match existing cmHasSuffix
parent
557b2d6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Source/cmAlgorithms.h
Source/cmAlgorithms.h
+8
-0
No files found.
Source/cmAlgorithms.h
View file @
2ad14ef4
...
...
@@ -336,6 +336,14 @@ std::reverse_iterator<Iter> cmMakeReverseIterator(Iter it)
return
std
::
reverse_iterator
<
Iter
>
(
it
);
}
inline
bool
cmHasPrefix
(
std
::
string
const
&
str
,
std
::
string
const
&
prefix
)
{
if
(
str
.
size
()
<
prefix
.
size
())
{
return
false
;
}
return
str
.
compare
(
0
,
prefix
.
size
(),
prefix
)
==
0
;
}
inline
bool
cmHasSuffix
(
const
std
::
string
&
str
,
const
std
::
string
&
suffix
)
{
if
(
str
.
size
()
<
suffix
.
size
())
{
...
...
Brad King
@brad.king
mentioned in commit
50ba2f01
·
Feb 14, 2019
mentioned in commit
50ba2f01
mentioned in commit 50ba2f019baa3e5487a975cb72059f1fc178f9d0
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment