Taking elgg_view and editng the string

I'm trying to take an elgg view... and edit the string before outputing:

$temp = elgg_view('output/url', array('value' => $theMedia1));

Then do some string modifications, then output

echo $temp;

However, I am unable to do anything string operations on $temp ie: When I try to output a substring of it, I get nothing... I can't pattern match anything with it.

Is elgg_view outputing a string variable? How can I do this modification?

Appreciate any help.