NCBI C++ ToolKit
Functions
Suspect_rule.cpp File Reference
#include <ncbi_pch.hpp>
#include <objects/macro/Suspect_rule.hpp>
#include <util/compile_time.hpp>
+ Include dependency graph for Suspect_rule.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

static bool IsStringConstraintEmpty (const CString_constraint *constraint)
 
static const string SkipWeasel (const string &str)
 
bool IsAllCaps (const string &str)
 
bool IsAllLowerCase (const string &str)
 
bool IsAllPunctuation (const string &str)
 
static bool CaseNCompareEqual (string str1, string str2, unsigned len1, bool case_sensitive)
 
static bool AdvancedStringCompare (const string &str, const string &str_match, const CString_constraint *str_cons, bool is_start, unsigned *ini_target_match_len=0)
 
static bool AdvancedStringMatch (const string &str, const CString_constraint *str_cons)
 
static bool DisallowCharacter (const char ch, bool disallow_slash)
 
static string StripUnimportantCharacters (const string &str, bool strip_space, bool strip_punct)
 
static bool IsWholeWordMatch (const string &start, const size_t &found, const unsigned &match_len, bool disallow_slash=false)
 
static bool GetSpanFromHyphenInString (const string &str, const size_t &hyphen, string &first, string &second)
 
static bool StringIsPositiveAllDigits (const string &str)
 
static bool IsStringInSpan (const string &str, const string &first, const string &second)
 
static bool IsStringInSpanInList (const string &str, const string &list)
 
static bool DoesSingleStringMatchConstraint (const string &str, const CString_constraint *str_cons)
 

Function Documentation

◆ AdvancedStringCompare()

static bool AdvancedStringCompare ( const string str,
const string str_match,
const CString_constraint str_cons,
bool  is_start,
unsigned *  ini_target_match_len = 0 
)
static

◆ AdvancedStringMatch()

static bool AdvancedStringMatch ( const string str,
const CString_constraint str_cons 
)
static

◆ CaseNCompareEqual()

static bool CaseNCompareEqual ( string  str1,
string  str2,
unsigned  len1,
bool  case_sensitive 
)
static

Definition at line 142 of file Suspect_rule.cpp.

References NStr::EqualNocase().

Referenced by AdvancedStringCompare().

◆ DisallowCharacter()

static bool DisallowCharacter ( const char  ch,
bool  disallow_slash 
)
static

Definition at line 319 of file Suspect_rule.cpp.

References isalpha(), and isdigit().

Referenced by IsWholeWordMatch().

◆ DoesSingleStringMatchConstraint()

static bool DoesSingleStringMatchConstraint ( const string str,
const CString_constraint str_cons 
)
static

◆ GetSpanFromHyphenInString()

static bool GetSpanFromHyphenInString ( const string str,
const size_t &  hyphen,
string first,
string second 
)
static

Definition at line 377 of file Suspect_rule.cpp.

References first(), isdigit(), isspace(), kEmptyStr, len, str(), and NStr::TruncateSpacesInPlace().

Referenced by IsStringInSpanInList().

◆ IsAllCaps()

bool IsAllCaps ( const string str)

Definition at line 113 of file Suspect_rule.cpp.

References str(), and NStr::ToUpper().

Referenced by DoesSingleStringMatchConstraint().

◆ IsAllLowerCase()

bool IsAllLowerCase ( const string str)

Definition at line 123 of file Suspect_rule.cpp.

References str(), and NStr::ToLower().

Referenced by DoesSingleStringMatchConstraint().

◆ IsAllPunctuation()

bool IsAllPunctuation ( const string str)

Definition at line 133 of file Suspect_rule.cpp.

References i, ispunct(), and str().

Referenced by DoesSingleStringMatchConstraint().

◆ IsStringConstraintEmpty()

static bool IsStringConstraintEmpty ( const CString_constraint constraint)
static

◆ IsStringInSpan()

static bool IsStringInSpan ( const string str,
const string first,
const string second 
)
static

◆ IsStringInSpanInList()

static bool IsStringInSpanInList ( const string str,
const string list 
)
static

Definition at line 528 of file Suspect_rule.cpp.

References GetSpanFromHyphenInString(), IsStringInSpan(), and str().

Referenced by DoesSingleStringMatchConstraint().

◆ IsWholeWordMatch()

static bool IsWholeWordMatch ( const string start,
const size_t &  found,
const unsigned &  match_len,
bool  disallow_slash = false 
)
static

Definition at line 351 of file Suspect_rule.cpp.

References DisallowCharacter().

Referenced by DoesSingleStringMatchConstraint().

◆ SkipWeasel()

static const string SkipWeasel ( const string str)
static

Definition at line 61 of file Suspect_rule.cpp.

References arr, NStr::EqualNocase(), i, int, kEmptyStr, len, NStr::Split(), and str().

Referenced by DoesSingleStringMatchConstraint().

◆ StringIsPositiveAllDigits()

static bool StringIsPositiveAllDigits ( const string str)
static

Definition at line 427 of file Suspect_rule.cpp.

References str().

Referenced by IsStringInSpan().

◆ StripUnimportantCharacters()

static string StripUnimportantCharacters ( const string str,
bool  strip_space,
bool  strip_punct 
)
static

Definition at line 331 of file Suspect_rule.cpp.

References ispunct(), isspace(), kEmptyStr, result, and str().

Referenced by DoesSingleStringMatchConstraint().

Modified on Tue Feb 27 05:52:28 2024 by modify_doxy.py rev. 669887