public function toSnakeCase(string $separator = '_'): self
    {

        return $this->toCamelCase()
            ->replace('/[A-Z]/', function ($piece) use ($separator) {
                return sprintf('%s%s', $separator, strtolower($piece));
            });
    }
public function toSnakeCase(string $separator = '_'): self
    {

        return $this->toCamelCase()
            ->replace('/[A-Z]/', function ($piece) use ($separator) {
                return sprintf('%s%s', $separator, strtolower($piece));
            });
    }
public function toSnakeCase ( string $ separator = '_' ) : self { return $ this -> toCamelCase ( ) -> replace ( '/[A-Z]/' , function ( $ piece ) use ( $ separator ) { return sprintf ( '%s%s' , $ separator , strtolower ( $ piece ) ) ; } ) ; }
Transforma la cadena de texto a formato snake_case

@param string $separator

@return \PlanB\Type\Text\Text
Transforma la cadena de texto a formato snake_case