mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Rework fixHebArticle() a bit.
This commit is contained in:
parent
2c6eb72148
commit
e87dce57ad
15
bgl.cc
15
bgl.cc
|
@ -576,12 +576,15 @@ void BglArticleRequest::fixHebString(string & hebStr) // Hebrew support - conver
|
||||||
|
|
||||||
void BglArticleRequest::fixHebArticle(string & hebArticle) // Hebrew support - remove extra chars at the end
|
void BglArticleRequest::fixHebArticle(string & hebArticle) // Hebrew support - remove extra chars at the end
|
||||||
{
|
{
|
||||||
int nulls=hebArticle.size()-1;
|
unsigned nulls;
|
||||||
while ( nulls>=0 && ((hebArticle[nulls]<=32 && hebArticle[nulls]>=0) || (hebArticle[nulls]>=65 && hebArticle[nulls]<=90))) //special chars and A-Z
|
|
||||||
{
|
for ( nulls = hebArticle.size(); nulls > 0 &&
|
||||||
nulls--;
|
( ( hebArticle[ nulls - 1 ] <= 32 &&
|
||||||
}
|
hebArticle[ nulls - 1 ] >= 0 ) ||
|
||||||
hebArticle.erase (hebArticle.begin()+nulls+1, hebArticle.end());
|
( hebArticle[ nulls - 1 ] >= 65 &&
|
||||||
|
hebArticle[ nulls - 1 ] <= 90 ) ); --nulls ) ; //special chars and A-Z
|
||||||
|
|
||||||
|
hebArticle.resize( nulls );
|
||||||
}
|
}
|
||||||
|
|
||||||
void BglArticleRequest::run()
|
void BglArticleRequest::run()
|
||||||
|
|
Loading…
Reference in a new issue