FOSSredder 0.5.0
Loading...
Searching...
No Matches
DefaultTransactionParser.cpp File Reference

Implements transaction parsing and amount resolution logic. More...

#include "core/application/import/transaction/DefaultTransactionParser.h"
#include "../../../utils/StringUtils.h"
#include "core/application/import/internal/ParserHelpers.h"
#include <algorithm>
#include <regex>
#include <string>
Include dependency graph for DefaultTransactionParser.cpp:

Go to the source code of this file.

Classes

struct  core::application::importing::transaction::OcrLine
 Represents one OCR line with its bounding box and recognized text. More...

Namespaces

namespace  core
namespace  core::application
namespace  core::application::importing
namespace  core::application::importing::transaction

Functions

int core::application::importing::transaction::textRightEdge (const OcrLine &l)
std::string collapseWhitespace (std::string s)
 Collapses consecutive whitespace to single spaces and trims the result.
std::vector< std::string > splitWhitespace (const std::string &s)
 Splits a string on ASCII whitespace.
std::string trim (std::string s)
 Removes leading and trailing ASCII whitespace from a string.

Detailed Description

Implements transaction parsing and amount resolution logic.

Definition in file DefaultTransactionParser.cpp.

Function Documentation

◆ collapseWhitespace()

std::string core::utils::collapseWhitespace ( std::string s)

Collapses consecutive whitespace to single spaces and trims the result.

Definition at line 34 of file StringUtils.cpp.

Here is the caller graph for this function:

◆ splitWhitespace()

std::vector< std::string > core::utils::splitWhitespace ( const std::string & s)

Splits a string on ASCII whitespace.

Definition at line 40 of file StringUtils.cpp.

◆ trim()

std::string core::utils::trim ( std::string s)

Removes leading and trailing ASCII whitespace from a string.

Definition at line 19 of file StringUtils.cpp.