mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +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
|
||||
{
|
||||
int nulls=hebArticle.size()-1;
|
||||
while ( nulls>=0 && ((hebArticle[nulls]<=32 && hebArticle[nulls]>=0) || (hebArticle[nulls]>=65 && hebArticle[nulls]<=90))) //special chars and A-Z
|
||||
{
|
||||
nulls--;
|
||||
}
|
||||
hebArticle.erase (hebArticle.begin()+nulls+1, hebArticle.end());
|
||||
unsigned nulls;
|
||||
|
||||
for ( nulls = hebArticle.size(); nulls > 0 &&
|
||||
( ( hebArticle[ nulls - 1 ] <= 32 &&
|
||||
hebArticle[ nulls - 1 ] >= 0 ) ||
|
||||
( hebArticle[ nulls - 1 ] >= 65 &&
|
||||
hebArticle[ nulls - 1 ] <= 90 ) ); --nulls ) ; //special chars and A-Z
|
||||
|
||||
hebArticle.resize( nulls );
|
||||
}
|
||||
|
||||
void BglArticleRequest::run()
|
||||
|
|
Loading…
Reference in a new issue