changed templates
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@715 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -59,6 +59,35 @@ void fil_tosmall(Info & i)
|
||||
}
|
||||
|
||||
|
||||
// a first letter in a sentence will be capitalized
|
||||
void fil_firstup(Info & i)
|
||||
{
|
||||
bool was_dot = true;
|
||||
const std::wstring & str = i.in.Str();
|
||||
|
||||
for(size_t a=0 ; a<str.size() ; ++a)
|
||||
{
|
||||
if( was_dot )
|
||||
{
|
||||
if( str[a]!=' ' && str[a]!='\t' && str[a]!=13 && str[a]!=10 && str[a]!=160 )
|
||||
was_dot = false;
|
||||
|
||||
if( str[a]>='a' && str[a]<='z' )
|
||||
i.out << R(wchar_t(str[a] - 'a' + 'A'));
|
||||
else
|
||||
i.out << R(str[a]);
|
||||
}
|
||||
else
|
||||
{
|
||||
i.out << R(str[a]);
|
||||
}
|
||||
|
||||
if( str[a] == '.' )
|
||||
was_dot = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user