[ create a new paste ] login | about

Link: http://codepad.org/naFB74K6    [ raw code | output | fork ]

PHP, pasted on Jul 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
function convertImage(&$string)
{
$string = preg_replace('/\s+/', '', $string);
$string = str_replace("'", "", $string);
$string = substr($string, 0, strlen($string)-3);
$string = strtolower($string);
return $string.".jpg";
}

$mod = "Thief's Wit (4)"; //storing the value

convertImage($mod);

echo $mod; //outputting the value

?>


Output:
1
thiefswit


Create a new paste based on this one


Comments: