# About ".substr"

**URL:** <https://forum.kirupa.com/t/about-substr/159868>\
**Category:** Uncategorized\
**Created:** [August 21, 2005, 11:48am UTC](https://forum.kirupa.com/t/about-substr/159868 "2005-08-21T11:48:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Only\_Dust](https://avatars.discourse-cdn.com/v4/letter/o/f1d935/32.png) [@Only\_Dust](https://forum.kirupa.com/u/Only_Dust)\
**Post date:** [August 21, 2005, 11:48am UTC](https://forum.kirupa.com/t/about-substr/159868/1 "2005-08-21T11:48:49Z")

</div>

I was reading in the HELP, about “.substr”.  
I tried to make an example, like this.

```auto

var my_str:String = "Hello world";
//dynamic text field, instance
exemplo_txt.html = true;
exemplo_txt.htmlText = "<font size =\"10\">" + my_str.substr(0, 2) + "</font>" + "<font size=\"28\">" + my_str.substr(2, my_str.length) + "</font>";
trace(exemplo_txt);

```

it goes to catch the two first letters, and to place a font size 10.  
later it it goes to catch the text and to place a font size 28.  
my question:  
exists some way to block, the text, it to only start to change the font size after caracter 5?  
because I do not know, how many characters I´m going to have, if I´m going to be only 1 caracter or only 3 or only 4.
