KiCad PCB EDA Suite
Loading...
Searching...
No Matches
text_diff.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef GIT_TEXT_DIFF_H
21#define GIT_TEXT_DIFF_H
22
23#include <string>
24#include <vector>
25
26// wxWidgets exports std::vector<wxString> from its own DLL. Without this header MSVC
27// exports a second copy from here and the link fails.
28#include <wx/arrstr.h>
29#include <wx/string.h>
30
31#include <kicommon.h>
32
33namespace KIGIT
34{
35
42
48
50KICOMMON_API std::vector<wxString> SplitTextLines( const std::string& aContent );
51
52KICOMMON_API bool TextLooksBinary( const std::string& aContent );
53
55KICOMMON_API std::vector<TEXT_DIFF_LINE> BuildTextDiff( const std::vector<wxString>& aOld,
56 const std::vector<wxString>& aNew );
57
58} // namespace KIGIT
59
60#endif // GIT_TEXT_DIFF_H
#define KICOMMON_API
Definition kicommon.h:27
TEXT_DIFF_KIND
Definition text_diff.h:37
std::vector< wxString > SplitTextLines(const std::string &aContent)
Tolerates CRLF endings and content that is not valid UTF-8.
Definition text_diff.cpp:28
bool TextLooksBinary(const std::string &aContent)
Definition text_diff.cpp:68
std::vector< TEXT_DIFF_LINE > BuildTextDiff(const std::vector< wxString > &aOld, const std::vector< wxString > &aNew)
Every line of both sides appears once. There are no hunks and nothing is elided.
Definition text_diff.cpp:77
TEXT_DIFF_KIND kind
Definition text_diff.h:45