original_string: 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();
  	}
code: 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();
  	}
code_tokens: 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 ( ) ; }
docstring: 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
docstring_tokens: Converts this string into StudlyCase . Numbers are considered as part of its previous piece .