# How to determine length of a string \[renamed\]

**URL:** <https://forum.kirupa.com/t/how-to-determine-length-of-a-string-renamed/85017>\
**Category:** flash\
**Created:** [April 1, 2005, 5:37am UTC](https://forum.kirupa.com/t/how-to-determine-length-of-a-string-renamed/85017 "2005-04-01T05:37:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [April 1, 2005, 5:37am UTC](https://forum.kirupa.com/t/how-to-determine-length-of-a-string-renamed/85017/1 "2005-04-01T05:37:40Z")

</div>

Sorry about that, but its obvious that while scanning a forum, the eye will be drawn to threads that are titled in caps and Ill hopefully hit the jackpot:D …anyway, Im using variables pulled in from a .cfm, and have split them into an array using .split("|"), so I can dynamically populate a nav bar…so now Ive got an Array of all the menu button names stored in the file…SOOOoooo…Say Ive got a button called “Home”, and the other “The Dysfunctional Properties of the Human Mind”, obviously I need the duplicate buttons to scale in width. Is there a way of finding out the number of letters in a string that is part of my array?

To reposition my duplicate buttons I used this -  
setProperty(“cats\_clip”+i, \_x, xstart+i\*\_root.cats\_clip.\_width);

To change the width I _want_ to use this  
setProperty(“cats\_clip”+i, \_[color=black]width[/color], [color=black]widthstart[/color]+i[color=red][color=black]_[/color](([color=red]number of characters in current string_[/color][/color][color=black]width of one letter)+a buffer to allow for space on the sides);[/color]  
[color=#ff0000][/color]  
[color=black]or something to that effect[/color]  
[color=black]So could anyone tell me what to use to replace the bit in red?[/color]
