Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-14-2004, 07:48 PM   #1
LOWCASH
Registered User
 
Join Date: Sep 2004
Posts: 2
Question character substitution/string manipulation

i want to take a phone number in the format 111-222-3333

strip out the dashes to make it 1112223333

seems simple but i am hung

please help
LOWCASH is offline   Reply With Quote
Old 09-14-2004, 07:51 PM   #2
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

author: [email protected] [+], Submitted: 04.06.01 12a
Code:
// remove all occurrences of strng from a string
String.prototype.remove = function (strng) {
	var temparray = this.split(strng);
	return temparray.join("");	
}

myphoneNbr=myphoneNbr.remove("-");
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 09-14-2004, 08:31 PM   #3
LOWCASH
Registered User
 
Join Date: Sep 2004
Posts: 2
Default !

ROGER THAT!

thanks a bunch
LOWCASH is offline   Reply With Quote
Old 09-15-2004, 03:06 PM   #4
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

just an fyi, the above code came from: http://proto.layer51.com/
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:29 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.