tlx
ends_with.hpp
Go to the documentation of this file.
1/*******************************************************************************
2 * tlx/string/ends_with.hpp
3 *
4 * Part of tlx - http://panthema.net/tlx
5 *
6 * Copyright (C) 2007-2019 Timo Bingmann <tb@panthema.net>
7 *
8 * All rights reserved. Published under the Boost Software License, Version 1.0
9 ******************************************************************************/
10
11#ifndef TLX_STRING_ENDS_WITH_HEADER
12#define TLX_STRING_ENDS_WITH_HEADER
13
14#include <string>
15
16namespace tlx {
17
18//! \addtogroup tlx_string
19//! \{
20
21/******************************************************************************/
22// ends_with()
23
24/*!
25 * Checks if the given match string is located at the end of this string.
26 */
27bool ends_with(const char* str, const char* match);
28
29/*!
30 * Checks if the given match string is located at the end of this string.
31 */
32bool ends_with(const char* str, const std::string& match);
33
34/*!
35 * Checks if the given match string is located at the end of this string.
36 */
37bool ends_with(const std::string& str, const char* match);
38
39/*!
40 * Checks if the given match string is located at the end of this string.
41 */
42bool ends_with(const std::string& str, const std::string& match);
43
44/******************************************************************************/
45// ends_with_icase()
46
47// /*!
48// * Checks if the given match string is located at the end of this
49// * string. Compares the characters case-insensitively.
50// */
51// bool ends_with_icase(const char* str, const char* match);
52
53// /*!
54// * Checks if the given match string is located at the end of this
55// * string. Compares the characters case-insensitively.
56// */
57// bool ends_with_icase(const char* str, const std::string& match);
58
59/*!
60 * Checks if the given match string is located at the end of this
61 * string. Compares the characters case-insensitively.
62 */
63bool ends_with_icase(const std::string& str, const char* match);
64
65/*!
66 * Checks if the given match string is located at the end of this
67 * string. Compares the characters case-insensitively.
68 */
69bool ends_with_icase(const std::string& str, const std::string& match);
70
71/******************************************************************************/
72
73//! \}
74
75} // namespace tlx
76
77#endif // !TLX_STRING_ENDS_WITH_HEADER
78
79/******************************************************************************/
bool ends_with(const char *str, const char *match)
Checks if the given match string is located at the end of this string.
Definition: ends_with.cpp:22
bool ends_with_icase(const char *str, const char *match)
Definition: ends_with.cpp:75