Is it possible to ignore white space between characters inside a text input field let's say a user types in "bri an" instead of "brian. Is there开发者_JAVA技巧 a way that white space is ignore and treated it as one word?
One of many ways is to use the TextField.restrict property. Simply prevent spaces from being typed into your textfield in the first place by doing this:
myTextField.restrict = "^ ";
The ^ means to disallow the following characters (in this case we are disallowing a space).
I put an example on wonderfl http://wonderfl.net/c/teOC
精彩评论