FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
cleanEntries.cc File Reference

Clean strings. More...

#include "cleanEntries.hpp"
#include <sstream>
#include <iterator>
Include dependency graph for cleanEntries.cc:

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...
 

Detailed Description

Clean strings.

Todo:

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.

Function Documentation

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

Parameters
sBeginString begin
sEndString end
Returns
string Trimmed string

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.

Parameters
sTextText for cleaning
mMatches to be cleaned
Returns
string Cleaned text

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.)

Parameters
sBeginString begin
sEndString end
Returns
string Clean statements

Definition at line 67 of file cleanEntries.cc.