Takes a snake case self and converts it to camel case

assert "random_method_id".to_camel_case == "randomMethodId"

If the identifier is prefixed by an underscore, the underscore is ignored

assert "_private_field".to_camel_case == "_privateField"

If self is upper, it is returned unchanged

assert "RANDOM_ID".to_camel_case == "RANDOM_ID"

If there are several consecutive underscores, they are considered as a single one

assert "random__method_id".to_camel_case == "randomMethodId"

Property definitions

core $ Text :: to_camel_case
	# Takes a snake case `self` and converts it to camel case
	#
	# ~~~
	# assert "random_method_id".to_camel_case == "randomMethodId"
	# ~~~
	#
	# If the identifier is prefixed by an underscore, the underscore is ignored
	#
	# ~~~
	# assert "_private_field".to_camel_case == "_privateField"
	# ~~~
	#
	# If `self` is upper, it is returned unchanged
	#
	# ~~~
	# assert "RANDOM_ID".to_camel_case == "RANDOM_ID"
	# ~~~
	#
	# If there are several consecutive underscores, they are considered as a single one
	#
	# ~~~
	# assert "random__method_id".to_camel_case == "randomMethodId"
	# ~~~
	fun to_camel_case: SELFTYPE is abstract
lib/core/text/abstract_text.nit:1351,2--1374,40

core $ Buffer :: to_camel_case
	redef fun to_camel_case
	do
		var new_str = clone
		new_str.camel_case
		return new_str
	end
lib/core/text/abstract_text.nit:1828,2--1833,4

core $ String :: to_camel_case
	redef fun to_camel_case do
		if self.is_upper then return self

		var new_str = new Buffer.with_cap(length)
		new_str.append self
		new_str.camel_case
		return new_str.to_s
	end
lib/core/text/abstract_text.nit:1499,2--1506,4