Posts Tagged ‘trim’

7 Trim() Equivalent Function In Flash Might Help Someone Else

audium-iconIn PHP we have a function called Trim() to remove characters from a string. However there are no the equivalent to PHP’s trim in Flash. But most time we need to trim a string with extra white space, so we can do only write this by ourselves. The following is 7 actionscript function which can do the same. They might help someone else. *If you know more please don’t hesitate to leave a comment.

(more…)

12 very simple,basic but useful function source in Flex

girl-128x128No matter what kind language using programmer will always accumulate many useful and daily using function with rich in development experience day by day. And then the accumulation become to a library at last. Of course it’s include the flex programmers. Following is some very basic, very simple functions which I’ve collected. How about you? If have any proudly and recommendable functions? Then, don’t only stock in your head, leave your comments. Let’s share. 

(more…)

Another JavaScript function for trim a string from white space

fonts-48x48 Thanks Joules  left a comment to let me konw that the language attribute for the script tag is deprecated (the article trim a string from white space by JavaScript function ).I wrote another javascript function for trim a string from white space at the front.(It will need some change for RTrim and Trim),I don’t konw there is faster way than below,if you know tell me pls. :)

(more…)

trim a string from white space by JavaScript function

trackball-K1-48x48 Some times we need to trim a string from white space at the front and end,even all in the string.How can we do that elegantly?Add the following string prototype function to your code. You will call it like predefined String member functions like Substring(),charAt() and indexOf().
The code below shows the function declaration and how to use it.

(more…)