Thrill  0.1
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-2019 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 char* str, const char* match);
27 
28 /*!
29  * Checks if the given match string is located at the start of this string.
30  */
31 bool starts_with(const char* str, const std::string& match);
32 
33 /*!
34  * Checks if the given match string is located at the start of this string.
35  */
36 bool starts_with(const std::string& str, const char* match);
37 
38 /*!
39  * Checks if the given match string is located at the start of this string.
40  */
41 bool starts_with(const std::string& str, const std::string& match);
42 
43 /******************************************************************************/
44 
45 /*!
46  * Checks if the given match string is located at the start of this
47  * string. Compares the characters case-insensitively.
48  */
49 bool starts_with_icase(const char* str, const char* match);
50 
51 /*!
52  * Checks if the given match string is located at the start of this
53  * string. Compares the characters case-insensitively.
54  */
55 bool starts_with_icase(const char* str, const std::string& match);
56 
57 /*!
58  * Checks if the given match string is located at the start of this
59  * string. Compares the characters case-insensitively.
60  */
61 bool starts_with_icase(const std::string& str, const char* match);
62 
63 /*!
64  * Checks if the given match string is located at the start of this
65  * string. Compares the characters case-insensitively.
66  */
67 bool starts_with_icase(const std::string& str, const std::string& match);
68 
69 /******************************************************************************/
70 
71 //! \}
72 
73 } // namespace tlx
74 
75 #endif // !TLX_STRING_STARTS_WITH_HEADER
76 
77 /******************************************************************************/
bool starts_with(const char *str, const char *match)
Checks if the given match string is located at the start of this string.
Definition: starts_with.cpp:21
std::basic_string< char, std::char_traits< char >, Allocator< char > > string
string with Manager tracking
Definition: allocator.hpp:220
bool starts_with_icase(const char *str, const char *match)
Checks if the given match string is located at the start of this string.
Definition: starts_with.cpp:55