John
You can write your own custom version of datalength function to suite your needs.
So you can decide what is returned.
The effort involved in "search and replace" will be same if you use your approach or custom function approach. But you will have total control of your logic to return what you need.
Caveat : you have to prefix the call to function with owner e.g. 'dbo.'
HTH
Avinash