Is there a function that will, if a string has more that 100 chars in it, just cut off anything after the 100th char?

If not, any hints on how to start writing this function myself?

Thanks