# String length

**URL:** <https://forum.kirupa.com/t/string-length/301759>\
**Category:** flash\
**Created:** [December 15, 2009, 8:15am UTC](https://forum.kirupa.com/t/string-length/301759 "2009-12-15T08:15:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![junior\_kimbroug](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@junior\_kimbroug](https://forum.kirupa.com/u/junior_kimbroug)\
**Post date:** [December 15, 2009, 8:15am UTC](https://forum.kirupa.com/t/string-length/301759/1 "2009-12-15T08:15:26Z")

</div>

Hello!

I am trying to count the characters in a string.

D4\_frame\_txt.[COLOR=#993300]text[/COLOR]=xmlList[COLOR=#000000][[/COLOR]j[COLOR=#000000]][/COLOR].[COLOR=#993300]toString[/COLOR]COLOR=#000000[/COLOR];  
D4\_frame\_txt.[COLOR=#993300]maxChars[/COLOR]=[COLOR=#000000]400[/COLOR];

[COLOR=#993300]if[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#F000F0]_//on overflow [/COLOR]  
[COLOR=#993300]trace[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[COLOR=#993300]else[/COLOR]  
[COLOR=#000000]{[/COLOR]  
[COLOR=#F000F0]// on non-overflow_[/COLOR]  
[COLOR=#000000]}

[/COLOR]I get no compiler error message but the count doesnt seem to work. Never overflow.

Thank you for the help!

Krgds
