Debian Codegraph @

CodeLite/StdToWX.h

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // Copyright : (C) 2015 Eran Ifrah
5 // File name : StdToWX.h
6 //
7 // -------------------------------------------------------------------------
8 // A
9 // _____ _ _ _ _
10 // / __ \ | | | | (_) |
11 // | / \/ ___ __| | ___| | _| |_ ___
12 // | | / _ \ / _ |/ _ \ | | | __/ _ )
13 // | \__/\ (_) | (_| | __/ |___| | || __/
14 // \____/\___/ \__,_|\___\_____/_|\__\___|
15 //
16 // F i l e
17 //
18 // This program is free software; you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation; either version 2 of the License, or
21 // (at your option) any later version.
22 //
23 //////////////////////////////////////////////////////////////////////////////
24 //////////////////////////////////////////////////////////////////////////////
25
26 #ifndef STDTOWX_H
27 #define STDTOWX_H
28
29 #include <wx/string.h>
30 #include <string>
31 #include "codelite_exports.h"
32
33 class WXDLLIMPEXP_CL StdToWX
34 {
35 public:
36 /**
37 * @brief remove from str string from offset 'from' with len
38 */
39 static void Remove(std::string& str, size_t from, size_t len);
40
41 /**
42 * @brief return true if str starts with what
43 */
44 static bool StartsWith(const std::string& str, const std::string& what);
45
46 /**
47 * @brief return true if str ends with what
48 */
49 static bool EndsWith(const std::string& str, const std::string& what);
50
51 /**
52 * @brief
53 */
54 static void Trim(std::string& str, bool fromRight = true);
55
56 /**
57 * @brief remove last count bytes
58 */
59 static void RemoveLast(std::string& str, size_t count);
60 };
61
62 #endif // STDTOWX_H