[I7] Length of a string coming from a table

Hey! I’m I need to measure the length of a string in table in Inform 7 for Glulx. In the following example

Table of examples
Order Name
1 “Fulvio Schiavone”
2 “Dahlia el-Baz”

I need something to determine for me that the length of the name string corresponding to order number 1 is 16, order number 2 is 13, etc.

Can’t seem to figure it out.



1 Like

There’s no built-in phrase for this, but you can define one pretty easily:

To decide what number is the character length of (T - text): (- TEXT_TY_CharacterLength({T}) -).

Did the trick! Thanks!

Doesn’t “the number of characters in T” do this?


Oh, heh. You’re quite right. I was searching the Standard Rules for a definition of TEXT_TY_CharacterLength, but I missed that one – it uses a different I6 call which winds up doing the same thing.