cosmetic and check for empty string in first_ucase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8413 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1683875e31
commit
dde9e85198
1 changed files with 7 additions and 7 deletions
|
|
@ -221,14 +221,14 @@ String *Swig_string_ucase(String *s) {
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
String *Swig_string_first_ucase(String *s) {
|
||||
String *ns = NewStringEmpty();
|
||||
char *cs = Char(s);
|
||||
if (cs) {
|
||||
Putc(toupper(cs[0]),ns);
|
||||
Append(ns, cs + 1);
|
||||
String *ns = NewStringEmpty();
|
||||
char *cs = Char(s);
|
||||
if (cs && cs[0] != 0) {
|
||||
Putc(toupper(cs[0]),ns);
|
||||
Append(ns, cs + 1);
|
||||
}
|
||||
return ns;
|
||||
}
|
||||
return ns;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Swig_string_typecode()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue