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:
parent
52795939d7
commit
5340de2a2e
1 changed files with 7 additions and 5 deletions
|
|
@ -195,11 +195,13 @@ String *Swig_string_utitle(String *s) {
|
||||||
|
|
||||||
Seek(s,0,SEEK_SET);
|
Seek(s,0,SEEK_SET);
|
||||||
while ((c = Getc(s)) != EOF) {
|
while ((c = Getc(s)) != EOF) {
|
||||||
if (isupper(c)) {
|
if (isalpha(c)) {
|
||||||
if (first) Putc('_',ns);
|
if (isupper(c)) {
|
||||||
first = 0;
|
if (first) Putc('_',ns);
|
||||||
} else {
|
first = 0;
|
||||||
first = 1;
|
} else {
|
||||||
|
first = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Putc(tolower(c),ns);
|
Putc(tolower(c),ns);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue