FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
|
Clean strings. More...
#include "cleanEntries.hpp"
#include <sstream>
#include <iterator>
Go to the source code of this file.
Functions | |
string | cleanGeneral (string::const_iterator sBegin, string::const_iterator sEnd) |
Trim space at beginning and end. More... | |
string | cleanStatement (string::const_iterator sBegin, string::const_iterator sEnd) |
Clean copyright statements from special characters (comment characters in programming languages, multiple spaces etc.) More... | |
string | cleanMatch (const string &sText, const match &m) |
Clean the text based on type. More... | |
Clean strings.
rearrange copyright statments to try and put the holder first, followed by the rest of the statement, less copyright years.
skip "dnl "
Definition in file cleanEntries.cc.
string cleanGeneral | ( | string::const_iterator | sBegin, |
string::const_iterator | sEnd | ||
) |
Trim space at beginning and end.
Since we already collapsed a sequence of spaces into one space, there can only be one space
sBegin | String begin |
sEnd | String end |
Definition at line 39 of file cleanEntries.cc.
string cleanMatch | ( | const string & | sText, |
const match & | m | ||
) |
Clean the text based on type.
If match type is statement, clean as statement. Else clean as general text.
sText | Text for cleaning |
m | Matches to be cleaned |
Definition at line 83 of file cleanEntries.cc.
string cleanStatement | ( | string::const_iterator | sBegin, |
string::const_iterator | sEnd | ||
) |
Clean copyright statements from special characters (comment characters in programming languages, multiple spaces etc.)
sBegin | String begin |
sEnd | String end |
Definition at line 67 of file cleanEntries.cc.