Looks cool, but any chance you could replace your micro-variable names
with real-world words for easy reading? Reminds me of moments when I
decide I need to run for coffee at work...
;)
H wrote:
Hey Mike,
public static function stripTag(s:String, t:String):String {
if(typeof(s) == 'string'){
t = t.toUpperCase();
var i:Number = s.length-1, oT:String = '<'+t, cT:String =
'</'+t, upString:String = s.toUpperCase();
while(true){
var c:Number = upString.lastIndexOf(oT, i);
var d:Number = upString.lastIndexOf(cT, i);
var a:Number = Math.max(c, d);
if(a==-1) break;
else {
var b:Number = s.indexOf('>', a)+1;
s = s.substring(0, a) + s.substring(b, s.length);
i = a-1;
}
}
} else s = '';
return s;
}
A little something I had laying around...
H
On Wed, Aug 27, 2008 at 1:00 PM, Mendelsohn, Michael <
[EMAIL PROTECTED]> wrote:
Perfect answer, H.
(Too bad it's AS2.) :-(
Thanks!
- MM
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders