changed: SpaceParser -- parser's engine has been rewritten

now we can map all strings to all strings
         documentation in space.h need to be updated yet


git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@407 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-05-10 21:16:19 +00:00
parent c8cf401316
commit e620c8f95d
4 changed files with 315 additions and 217 deletions

View File

@@ -638,6 +638,31 @@ return false;
}
/*
those white characters here should be the same as in spaceparser.cpp
*/
bool Space::IsWhite(int c)
{
// dont use '\n' here
// 13 (\r) is at the end of a line in a dos file \r\n
// 160 is an unbreakable space
if( c==' ' || c=='\t' || c==13 || c==160 )
return true;
return false;
}
bool Space::HasWhite(const std::wstring & str)
{
for(size_t i=0 ; i<str.size() ; ++i)
if( IsWhite(str[i]) )
return true;
return false;
}
} // namespace