Functionality This function maps a long string that is fed into it to a formatrequired by Singapore's tax authority in IR21 report. It basicallyparses the long string input character per character. The key characters which are used for correct parsing and mappingoperations are as follows: '#': hash sign, required for identifying story number '-': hyphen sign, required for identifying unit number ',': comma, used as new field indicator except in street name (it is not required) Block/house number must precede the street name, otherwise it will be considered as a part of street name. Block/house number can be preceded by "BLOCK" or "BLK", but it is optional. If there is a character string "BLOCK" or "BLK" follows the block/house number (e.g. 123 BLOCK ABC STILL ROAD #02-344), it will considered as part of street name (i.e. Block Number = 123, Street Name = BLOCK ABC STILL ROAD, and so on). Return code would be one of the following: '0' succesful '4' warning (all fields would be returned in StreetName) part of street name (i.e. Block Number = 123, Street Name = BLOCK ABC STILL ROAD, and so on). Return code would be one of the following: '0' succesful '4' warning (all fields would be returned in StreetName) Example Longstring: 1. 750A Chai Chee Road #07-00 2. Block 750A Chai Chee Road #07-00 3. #07-00 Blk 750A Chai Chee Road Output: Case 1,2,3: BlockNumber : 750A StoryNumber : 07 UnitNumber : 00 StreetName : Chai Chee Road ReturnCode : 0 |