# OOP / Extending String

**URL:** <https://forum.kirupa.com/t/oop-extending-string/231779>\
**Category:** flash\
**Created:** [July 8, 2007, 1:15am UTC](https://forum.kirupa.com/t/oop-extending-string/231779 "2007-07-08T01:15:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nburlington](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nburlington/32/1365_2.png) [@nburlington](https://forum.kirupa.com/u/nburlington)\
**Post date:** [July 8, 2007, 1:15am UTC](https://forum.kirupa.com/t/oop-extending-string/231779/1 "2007-07-08T01:15:36Z")

</div>

How do I create a class that extends the String class?

Lets say I’ve created an ‘exString’ class that extends String.

In my project file I do the following

```auto
var test:exString = new exString();
test = "Hello World";
text.someExStringFunction();

```

I get a type mismatch in my “Hello World” assignment because Flash sees it as a String and not as an exString.
