Bug 279 - Cannot handle input ending with space
Summary: Cannot handle input ending with space
Status: RESOLVED FIXED
Alias: None
Product: Group 9: Route Planning
Classification: Unclassified
Component: Interface (show other bugs)
Version: 1.0
Hardware: PC Mac OS
: Normal enhancement
Assignee: zhanjiang2-c
URL:
Depends on:
Blocks:
 
Reported: 2018-12-08 17:57 HKT by zixuan.huang
Modified: 2018-12-09 13:32 HKT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zixuan.huang 2018-12-08 17:57:53 HKT
Step to reproduce:
1. Run the program. In the "Route Planning System" menu, input 2 to choose "Get facility info". Then in the "Get facility info" menu, input 1 to choose "Search a facility".
2. For "Please enter station name:", input Sha Tin . Note that Sha Tin is a valid Station name and the input ends with an extra space.

Expected result: System output "Please choose service type:".
Actual result: Invalid Input!

I believe that, for a searching function, we should at least be able to accommodate some typo in the input that will not affect its meaning. An ending space is one of them.

Please add a function to filter the space and line-changer in the input.
Comment 1 zhanjiang2-c 2018-12-08 17:59:18 HKT
Your requirement is sound. Bug fixed.