IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 1 reply
  • Latest Post - ‏2010-02-01T15:22:26Z by POWERBUILDER
POWERBUILDER
POWERBUILDER
3 Posts

Pinned topic How not to capture empty space

‏2010-02-01T15:11:50Z |
The small and very urgent problem I have now is related to function trim () which does not work in Java code. The desirable result: If space (without text) is entered by the user by clicking space bar I want NO action in search after that. In other words, if user clicks "search" button after entering empty space nothing should happen.

Your help is greatly appreciated

Respectfully,

A.R.
Updated on 2010-02-01T15:22:26Z at 2010-02-01T15:22:26Z by POWERBUILDER
  • POWERBUILDER
    POWERBUILDER
    3 Posts

    Re: How not to capture empty space

    ‏2010-02-01T15:22:26Z  
    Here is additional info on my "empty space " problem.

    Right now after I put cursor into a search field (string) and click on space bar I got error: my WHERE clause> with LIKE stops working (FYI, - I Use delimiter (" ") in this search). I tried OR instead of LIKE - no success.

    How should it work if only a space character is entered? We need to trim it out and treat it as nothing entered at all. String.trim() does not work here.