test(and fix) the utitle encoder

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8364 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-10 23:40:07 +00:00
commit 7f05256bb7
2 changed files with 5 additions and 2 deletions

View file

@ -196,9 +196,8 @@ String *Swig_string_utitle(String *s) {
Seek(s,0,SEEK_SET);
while ((c = Getc(s)) != EOF) {
if (isupper(c)) {
if (!first) Putc('_',ns);
if (first) Putc('_',ns);
first = 1;
continue;
}
Putc(tolower(c),ns);
}