JavaScript doesn’t natively support the string trim (removing leading and trailing spaces) function, but this function is quite useful and required from time to time. Fortunately, you can do this as easily as by just single line of code using regular expression and can add support to all the string objects using the JavaScript prototyping. […]
Posts Tagged ‘string’
JavaScript String Replace All function
JavaScript provides the basic functions for string and other operations, but one needs lot more when working on some complex routines. Fortunately, the JavaScript prototype extension model helps us make custom functions available to all core objects of that type. Anyway, coming back to point. JavaScript provides a string replace function, but it only replace […]
Convert long array to string array using anonymous delegates in C#
I was looking today for a simple technique to get a list of long array values as a comma separate string (something similar to what JavaScript does with arrays). I didn’t find any method of the Array and List objects to return that comma separated string. Just before I decided to implement it using the […]