It's all about passion
We develop custom software for small businesses and entrepreneurs and we do it with passion. What does it mean? We care about what we do. We treat our customers' projects as if they were ours. We deliver personal service and always do our best to offer more value and be more efficient. We innovate. We rely on bright people rather than on formal procedures. It's all about passion, passion about making the best software in the world in the most efficient way.Metalink's primary focus is:
Our customers list includes start-ups and small businesses from USA, Australia, England, China and Singapore. If you are looking for fast and iterative development performed by young, innovative and mobile team then you are on the right page.
Veronika Zaslavskaya
CEO
Veronika was one of company founders and since the beginning her responsibilities include looking after our cash flow and make sure everyone in the company is happy. She received master’s degree in information technology from St. Petersburg State Technical University and spent last six years working in IT ...
More people
trim() function for ActionScript and JavaScript
By Alexey Gavrilov on February 7, 2010
Strangely ActionScript doesn’t have trim() function, JavaScript doesn’t have it either.
I needed the one lately and googled it but a few solutions that came up looked weird (using several for() cycles for example). So I came up with this one — if you know how to make it simpler or shorter, l’d be very interested to hear your solution.
Old school style:
function trim(s) {
return s.match(/^s*(.*?)s*$/)[1];
}
var s = trim(" well done "); // s = "well done"
Modern style:
String.prototype.trim = function() {
return this.match(/^s*(.*?)s*$/)[1];
}
var s = " even better ".trim(); // s = "even better"
Enjoy!
(categories: Technology, Solutions box)
- Life (32)
- Solutions box (19)
- Technology (49)
- Usability (14)
- Vista (3)



