Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | RE: FLASH: string functions? |
| From: | Phillip Kerman |
| Date: | Thu, 18 Jan 2001 21:54:47 GMT |
I don't know if this is the easiest... but it's one way I use in my upcoming
book "ActionScripting in Flash":
function removeCharacter (whatChar,fromString) {
var charFound=1
while (true) {
charFound = fromString.indexOf(whatChar);
if (charFound == -1) {
return fromString;
}
fromString =fromString.substr(0,charFound)+fromString.substr(charFound+1);
}
}
// to use removeCharacter(",","the,string,with commas"));
> -----Original Message-----
> From: owner
> olga
> Sent: Thursday, January 18, 2001 1:04 PM
> To: flasher
> Subject: FLASH: string functions?
>
>
> What's the easiest way to remove a repeated character from a string?
>
> I have a string with repeating commas that I need to extract:
>
> "the dog, is blue, on saturdays, and sundays."
>
> to:" the dog is blue on saturdays and sundays."
>
> Thanks!!
> Olga
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flasher is generously supported by...
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flashforward2000 and the Flash(tm) Film Festival
> November 27-29, 2000, LONDON, National Film Theatre
>
> Produced by United Digital Artists and lynda.com
> -Sponsored by Macromedia, Adobe Systems and Apple Computer
> -http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
> Register before November 10 and save �200
> http:// www.flashforward2000.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email help
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email help
Replies
Re: FLASH: string functions?, olga
Replies
FLASH: string functions?, olga
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

