grasshopper
09-01-03, 07:32 PM
Can any of you IT folk help me with this query.
I have a str Variable which is holding a number that the user inputs.
This number is used to query a database.
This works fine providing the user enters the number as a spaceless string. eg 1234567890. Unfortunatley there are the times that it will be entered in 3 3 4 format ie. 123 456 7890.
Before this number is passed through to the database it needs to be trimmed to a spaceless string. I know .trim() will trim spaces at the beginning and end of a string but i need to be able to remove spaces anywhere in the string.
Does anybody know how this can be done. .
Thanks in advance..
Hoppy
I have a str Variable which is holding a number that the user inputs.
This number is used to query a database.
This works fine providing the user enters the number as a spaceless string. eg 1234567890. Unfortunatley there are the times that it will be entered in 3 3 4 format ie. 123 456 7890.
Before this number is passed through to the database it needs to be trimmed to a spaceless string. I know .trim() will trim spaces at the beginning and end of a string but i need to be able to remove spaces anywhere in the string.
Does anybody know how this can be done. .
Thanks in advance..
Hoppy