Truncating a token?

I want Noodle to read the first lines of text of documents and then to use those lines as the file name. However I want to limit the file name length to 100 characters. Often the first 100 characters are spread over more than one page. Whilst I can create a token containing this text, I often find my token has too many characters to be used. How to I truncate the token length to the desired number of characters?