Difference between revisions of "gc:getStringWidth"

From Inspired-Lua Wiki
Jump to navigation Jump to search
(Created page with "gc:'''getStringWidth''' is a function that is part of the gc. Returns a number : the string's width in pixels. {{Since|3.0}} == Syntax == gc:'''getStringWidt...")
 
 
(One intermediate revision by the same user not shown)
Line 12: Line 12:
 
! Parameter !! Type !! Description
 
! Parameter !! Type !! Description
 
|-
 
|-
| <u><center>string</center></u> || string || The string you want to have the width of.
+
| <u><center>string</center></u> || string || The string you want to get the width of.
 
|-
 
|-
 
|}
 
|}
  
 
== Example  ==
 
== Example  ==
<syntaxhighlight>width = gc:getStringWidth("hello") -- width = 5</syntaxhighlight>
+
<syntaxhighlight>width = gc:getStringWidth("hello")</syntaxhighlight>
  
 
== See also  ==
 
== See also  ==

Latest revision as of 16:46, 17 December 2013

gc:getStringWidth is a function that is part of the gc.

Returns a number : the string's width in pixels.

This has been introduced in TI-Nspire OS 3.0 (Changes).


Syntax

gc:getStringWidth(string)

Parameter Type Description
string
string The string you want to get the width of.

Example

width = gc:getStringWidth("hello")

See also