Trying to write a function that doesn't require dbo. prefix
Using system_function_schema was an undocumented and unsupported process in SQL 2000. As of SQL 2005, it is no longer possible.

By design, UDFs require that the schema be included in the function call.

There is one exception: calling the function like a procedure doesn't actually require the schema, but also wouldn't be terribly useful for your function.

exec trim @input = ' foo '


Additionally, be sure to carefully test queries with scalar functions--they can have significant impact on performance.