public function toStudlyCase() {
		$input = $this->trim('-_');
		if ($input->isEmpty()) {
			return $input;
		}
		$encoding = $this->encoding;
		return Text::create(preg_replace_callback('/([A-Z-_][a-z0-9]+)/', function ($matches) use ($encoding) {
			return Text::create($matches[0], $encoding)->replace(['-', '_'], '')->toUpperCaseFirst();
		}, $input), $this->encoding)->toUpperCaseFirst();
	}
public function toStudlyCase() {
		$input = $this->trim('-_');
		if ($input->isEmpty()) {
			return $input;
		}
		$encoding = $this->encoding;
		return Text::create(preg_replace_callback('/([A-Z-_][a-z0-9]+)/', function ($matches) use ($encoding) {
			return Text::create($matches[0], $encoding)->replace(['-', '_'], '')->toUpperCaseFirst();
		}, $input), $this->encoding)->toUpperCaseFirst();
	}
public function toStudlyCase ( ) { $ input = $ this -> trim ( '-_' ) ; if ( $ input -> isEmpty ( ) ) { return $ input ; } $ encoding = $ this -> encoding ; return Text :: create ( preg_replace_callback ( '/([A-Z-_][a-z0-9]+)/' , function ( $ matches ) use ( $ encoding ) { return Text :: create ( $ matches [ 0 ] , $ encoding ) -> replace ( [ '-' , '_' ] , '' ) -> toUpperCaseFirst ( ) ; } , $ input ) , $ this -> encoding ) -> toUpperCaseFirst ( ) ; }
Converts this string into StudlyCase. Numbers are considered as part of its previous piece.

<code>
$var = new Text('my_own_variable');<br>
$var->toStudlyCase(); // MyOwnVariable

$var = new Text('my_test3_variable');<br>
$var->toStudlyCase(); // MyTest3Variable
</code>

@return Text
Converts this string into StudlyCase . Numbers are considered as part of its previous piece .