Commit fe8d0698 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

iterate correctly over string in camel_case_to_lower_case method, fixes

2007-05-09  Jürg Billeter  <j@bitron.ch>

	* vala/valanamespace.vala: iterate correctly over string in
	  camel_case_to_lower_case method, fixes bug 436760

svn path=/trunk/; revision=311
parent 899d284a
2007-05-09 Jürg Billeter <j@bitron.ch>
* vala/valanamespace.vala: iterate correctly over string in
camel_case_to_lower_case method, fixes bug 436760
2007-05-09 Jürg Billeter <j@bitron.ch>
* vala/valanamespace.vala: don't add default include directives for
......
......@@ -233,16 +233,16 @@ public class Vala.Namespace : CodeNode {
*/
public static ref string! camel_case_to_lower_case (string! camel_case) {
String result = new String ("");
string i = camel_case;
weak string i = camel_case;
bool first = true;
while (i.len () > 0) {
unichar c = i.get_char ();
if (c.isupper () && !first) {
/* current character is upper case and
* we're not at the beginning */
string t = i.prev_char ();
weak string t = i.prev_char ();
bool prev_upper = t.get_char ().isupper ();
t = i.next_char ();
bool next_upper = t.get_char ().isupper ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment