CodeIgniter文本到url

Can't find if codeigniter have any build-in helper to format string to url? For example "Lorem ipsum dolor sit amet" will be "lorem-ipsum-dolor-sit-amet" or something like that.

Specifically, CodeIgniter has the url_title() method, which does what you're asking for. This method will remove all non URL usable characters.

$title = "Here's a string!";
$url_title = url_title($title);

// Produces: Heres-a-string

The documentation for this method (as well as the other URL helper methods built into CI) can be found here.

You can just use built-in PHP functions. Here is an example:

<?php
$my_string = "Lorem ipsum dolor sit amet";
$my_url    = strtolower(str_replace(' ','-',$my_string)); 
echo $my_url;
?>