more fixes to utitle

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8393 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-12 21:09:58 +00:00
commit 5340de2a2e

View file

@ -195,11 +195,13 @@ String *Swig_string_utitle(String *s) {
Seek(s,0,SEEK_SET);
while ((c = Getc(s)) != EOF) {
if (isupper(c)) {
if (first) Putc('_',ns);
first = 0;
} else {
first = 1;
if (isalpha(c)) {
if (isupper(c)) {
if (first) Putc('_',ns);
first = 0;
} else {
first = 1;
}
}
Putc(tolower(c),ns);
}