]>
git.saurik.com Git - apple/system_cmds.git/blob - CPPUtil/UtilString.cpp
80d5cc3c3e69f347952d729e03129e2fda8298f3
5 // Created by James McIlree on 4/17/13.
6 // Copyright (c) 2013 Apple. All rights reserved.
13 bool ends_with(std::string
& str
, std::string postfix
) {
14 size_t pos
= str
.rfind(postfix
);
15 return ((pos
!= std::string::npos
) && (pos
== (str
.length() - postfix
.length())));