Handle different string lengths in the casting system.