Graphic Euphoria

  • Home
  • What have you come across?

Seperate a number (int) from string using Mootools

Posted in Javascript | No Comments
I recently blogged about using regular expressions to extract a number or integer from a string in javascript. So what if you are using Mootools? Well you save even more time:
//only works for a string beginning with a number!
('123 Hello World').toInt();  //=> '123'
Mootools FTW!
Spread me about thin:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
Tags: mootools

You might also like:

  • Google Analyitics - fix the '_gat' is undefined problem in IE6 with Mootools
  • Detect Internet Explorer 6 (IE6) and other popular browsers with Mootools
  • Javascript: Passing variables with setTimeout and getting it to work in Internet Explorer
  • Checklist for a Successful Website Launch
  • Detect ALL versions of internet explorer 6 with one line of javascript!
  • Seperate a number (int) from a string in Javascript

Leave a Reply

Recent Post

  • Seperate a number (int) from string using Mootools
  • Seperate a number (int) from a string in Javascript
  • Detect Internet Explorer 6 (IE6) and other popular browsers with Mootools
  • Diana takes one for the team – facebook username mischief
  • Font stacks, the !important css declaration and some html tips
  • Save IE6 – if only Internet Explorer 6 was as good as this site
  • Did you notice it’s the 1st April – a round up of some of the best hoaxes
  • Google Analyitics – fix the ‘_gat’ is undefined problem in IE6 with Mootools
  • Flash Quick Tip: How to randomize an Array
  • Inspired thinking – I Wear Your Shirt

Recent Comments

  • Si:and it's fixed! That is fast.
  • Jamland:Thanx!
  • Si:i have just created a new movi
  • praphul garg:on running the function the fi
  • Si:Good tip, it doesn't mention t
  • David McGeorge:Good post. I used to like how
  • Shane:I am the one that posted this
  • Si:@Scott haha! @David since f
  • David:I would have to say that is te
  • Scott Vogel:Her name is Diana Ostaszewski

Archives

  • October 2009
  • September 2009
  • July 2009
  • June 2009
  • April 2009
  • March 2009
  • February 2009
  • Categories

    • Art and Design
    • CSS
    • Findability (SEO)
    • Flash
    • Graphic Design
    • Inspiration
    • Javascript
    • Photography
    • Social Neworks
    • Software
    • Video
    • Web Design
    • Web-Apps
    • Websites
    • Wordpress
  • Archives

    • October 2009
    • September 2009
    • July 2009
    • June 2009
    • April 2009
    • March 2009
    • February 2009
  • Links

    • Clocopops
    • Cosmicbug
    • Fiona Donaldson
  • Recent Posts

    • Firefox not displaying dynamically embedded flash? Page-speed might be your problem!
    • Seperate a number (int) from string using Mootools
    • Seperate a number (int) from a string in Javascript
    • Detect Internet Explorer 6 (IE6) and other popular browsers with Mootools
    • Diana takes one for the team – facebook username mischief
    • Font stacks, the !important css declaration and some html tips
    • Save IE6 – if only Internet Explorer 6 was as good as this site
    • Did you notice it’s the 1st April – a round up of some of the best hoaxes
    • Google Analyitics – fix the ‘_gat’ is undefined problem in IE6 with Mootools
    • Flash Quick Tip: How to randomize an Array
  • Meta

    • Register
    • Log in
  • Home
  • What have you come across?