public function toSnakeCase(): Utility
    {
        $string = mb_ereg_replace('\B([A-Z])', '-\1', trim($this->string));

        $string = mb_strtolower($string, $this->encoding);

        $string = mb_ereg_replace('[-_\s]+', '_', $string);

        return new static($string, $this->encoding);
    }
public function toSnakeCase(): Utility
    {
        $string = mb_ereg_replace('\B([A-Z])', '-\1', trim($this->string));

        $string = mb_strtolower($string, $this->encoding);

        $string = mb_ereg_replace('[-_\s]+', '_', $string);

        return new static($string, $this->encoding);
    }
public function toSnakeCase ( ) : Utility { $ string = mb_ereg_replace ( '\B([A-Z])' , '-\1' , trim ( $ this -> string ) ) ; $ string = mb_strtolower ( $ string , $ this -> encoding ) ; $ string = mb_ereg_replace ( '[-_\s]+' , '_' , $ string ) ; return new static ( $ string , $ this -> encoding ) ; }
Transform the value to snake_case format

@return $this
Transform the value to snake_case format