45 {
"Egr" ,
"Epsilon" },
54 {
"Ogr" ,
"Omicron" },
62 {
"Ugr" ,
"Upsilon" },
70 {
"egr" ,
"epsilon" },
80 {
"ogr" ,
"omicron" },
90 {
"ugr" ,
"upsilon" },
105 while (amp !=
NPOS) {
108 size_t old_len = semi - amp - 1;
109 string ts = sgml.substr(amp + 1, old_len);
111 if (it != sc_SgmlAsciiMap.end()) {
112 size_t new_len = strlen(it->second);
115 sgml.replace(amp + 1, old_len, it->second);
116 semi = amp + 1 + new_len;
125 amp = sgml.find(
'&', semi + 1);
144 while (pos != string::npos && !found) {
146 const char *end =
str.c_str() + pos + 1;
147 while (*end != 0 &&
isalpha (*end)) {
151 if (*end ==
';' &&
len > 1) {
155 while (it != sc_SgmlAsciiMap.end() && !found) {
class CStaticArrayMap<> is an array adaptor that provides an STLish interface to statically-defined a...
TBase::const_iterator const_iterator
static const char * str(char *buf, int n)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_STD::string::size_type SIZE_TYPE
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static int match(register const pcre_uchar *eptr, register const pcre_uchar *ecode, const pcre_uchar *mstart, int offset_top, match_data *md, eptrblock *eptrb, unsigned int rdepth)
bool ContainsSgml(const string &str)
DEFINE_STATIC_ARRAY_MAP(TSgmlAsciiMap, sc_SgmlAsciiMap, sc_sgml_entity)
SStaticPair< const char *, const char * > TSgmlAsciiPair
void Sgml2Ascii(string &sgml)
Convert SGML entity to ASCII (in place)
CStaticPairArrayMap< const char *, const char *, PCase_CStr > TSgmlAsciiMap
static const TSgmlAsciiPair sc_sgml_entity[]
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...