Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
starts_with.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * tlx/string/starts_with.hpp
3  *
4  * Part of tlx - http://panthema.net/tlx
5  *
6  * Copyright (C) 2007-2017 Timo Bingmann <[email protected]>
7  *
8  * All rights reserved. Published under the Boost Software License, Version 1.0
9  ******************************************************************************/
10 
11 #ifndef TLX_STRING_STARTS_WITH_HEADER
12 #define TLX_STRING_STARTS_WITH_HEADER
13 
14 #include <string>
15 
16 namespace tlx {
17 
18 //! \addtogroup tlx_string
19 //! \{
20 
21 /******************************************************************************/
22 
23 /*!
24  * Checks if the given match string is located at the start of this string.
25  */
26 bool starts_with(const std::string& str, const std::string& match);
27 
28 /*!
29  * Checks if the given match string is located at the start of this string.
30  */
31 bool starts_with(const std::string& str, const char* match);
32 
33 /******************************************************************************/
34 
35 /*!
36  * Checks if the given match string is located at the start of this
37  * string. Compares the characters case-insensitively.
38  */
39 bool starts_with_icase(const std::string& str, const std::string& match);
40 
41 /*!
42  * Checks if the given match string is located at the start of this
43  * string. Compares the characters case-insensitively.
44  */
45 bool starts_with_icase(const std::string& str, const char* match);
46 
47 //! \}
48 
49 } // namespace tlx
50 
51 #endif // !TLX_STRING_STARTS_WITH_HEADER
52 
53 /******************************************************************************/
bool starts_with_icase(const std::string &str, const std::string &match)
Checks if the given match string is located at the start of this string.
Definition: starts_with.cpp:39
std::basic_string< char, std::char_traits< char >, Allocator< char > > string
string with Manager tracking
Definition: allocator.hpp:220
bool starts_with(const std::string &str, const std::string &match)
Checks if the given match string is located at the start of this string.
Definition: starts_with.cpp:19