$width = $txt->advancewidth $string [, %textstate] Returns the width of the string based on all currently set text-attributes or on those overridden by %textstate.