How do you access the base class when extending the String class
I want to extend the String class so that I can add a replace method.
Currently I have the following
class RegString {
var str:String;
function RegString( string:String ) {
str = string;
}
function replace( matchstr:String, replacestr:String ) {
var s = str;
.
.
.
The replace function works fine but I can't use any RegString instances like String objects, whereas I would like to be able to do assignments etc... with other String objects.
So what I want is
class RegString extends String {
function replace( matchStr:String, replace:String ) {
...but how do I access the base string here?...
|