Parsing turns external text into typed values. It is also where a program needs to decide what counts as a valid record. A conversion function can accept syntax that your business rule still rejects, so check those two questions separately. Trimming whitespace may be appropriate for a configuration value but wrong for an identifier whose spaces matter. The tasks spell out each choice. You will parse counts, pairs and bounded values from original repair-desk feeds. Return errors when the input is malformed and keep zero as a valid value when the contract allows it. Do not silently return a partial total after one bad field. A caller needs to know whether the entire requested conversion succeeded.
Trim allowed surrounding whitespace.