Inform seems rather lacking in string manipulation utilities: There doesn't seem to be any way to slice a string, nor any way to change one in place except by match replacement.
As a result, it's unclear what the best way to truncate a string is. This story file is a simple benchmark for 6 different methods:
- building the new string character-by-character from the start
- copying the string then erasing the extra characters left-to-right